One of the hardest things about trying to make my own text editor when I was in high school was vertical motion. I could never quite match Notepad or Word and ended up settling. While I have finally done it.
First gif is the old motion. The cursor would always move to the "longest run of text" that fit within it's current x position. However, Real Text Editors, travel the shortest distance to the next line. This means the cursor can move either forwards or backwards. Additionally, they preserver the "desired position" of the cursor. Meaning if you start at hello wo|rld and move down twelve lines to another hello world, your cursor will stay between wo and rld.
After spending the after noon figuring out things and remembering pitfall traps. I have finally gotten my cursor to move like LibreOffice's :tia_pog:
Gonna have to update my wikithing with my Day 5 for December Adventure cause today is a huge win 😩