Fork of lines.love without drawings; useful starting point for further forks

back to the problem of cursor going off screen

I just went over all my changes in this vein: git diff 6fe017ba75

(Turns out git diff "does what you want" and excludes changes merged in from upstream: https://stackoverflow.com/questions/7488956/git-diff-on-topic-branch-excluding-merge-commits-that-happened-in-the-meantime)

First step: clean up all debug prints. I'm still going to keep unrelated improvements. In particular, the assertion checking for screen going off screen now works, so this bug will be more apparent.

Summary of the problem: Text.snap_cursor_to_bottom_of_screen (which sets screen_top) interacts poorly with plan_draw (which sets Display_settings.y). It's easy to cause 3 misfits:

  • typing on bottom screen line: cursor goes off screen when line wraps
  • down arrow in edit mode: cursor goes off screen
  • down arrow in edit mode: cursor doesn't actually move to next line text (ignoring scrolling)
  • unnecessary scrolling: down arrow at top screen line or up arrow at bottom screen line

Created by  Kartik K. Agaram  on August 22, 2022
6LBSEPBJTXIVBYX3AH5FYCQCN66ZRFFO3IVYMDS7IQUGEAZM3MHQC
Dependencies
In channels
main
Change contents