Closed nicholascarroll closed 1 month ago
PR #36 implemented toggle-truncate-lines. In doing this I introduced bug/s which manifest when you have very long lines in wrapped mode: you can't get to the last line of the file with down arrow or M->. Page up/down work perfectly though and exactly the same as Emacs. Trying to fix this I got the distinct impression that I was overcomplicating things. I decided the best approach was to:
if (truncate_lines == 1)
. Therefore @japanoise when you review this PR, compare to the version of main.c that you had before PR #36 - commit 40a7316. Then you will be able to follow more easily how toggle-truncate-lines code is introduced.A consequence of this is that Visual Mark had to come out of editorDrawRows for the time being. Both Visual Mark and Emacs style page up/down are implemented in my visual-mark branch.
@nicholascarroll anything more to do here?
Rewrite of editorSetScxScy, editorScroll and editorDrawRow