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

fix a regression (attempt #2)

scenario: paste enough text that the note needs to scroll Before this commit the cursor would end up outside the viewport and crash.

The editor widget was originally implemented in isolation, to take over the whole window (App.screen). If it starts low down the window it assumes it's always going to have just a few lines of height to work with. That can cause it to scroll too much and seem jarring at times. I have a special case in maybe_update_screen_top_of_cursor_pane to detect such situations and not use the editor's scrolling logic. I need to update the cursor pane's screen_top when the special case triggers.

Another way to put it: The decision of when to adjust the global viewport from within a single editor buffer can get intricate. We'll let maybe_update_screen_top_of_cursor_pane make any heuristic choices it likes as long as it communicates accurately with the outside whether it changed the global viewport.

Regression introduced in commit 926c66a908.

Attempt #1: commit b1c26e98a. This commit doesn't change my logic, just gives git blame a clean starting point.

Created by  Kartik K. Agaram  on December 29, 2022
4WAZ3E5BASY4GJDS5XNDRPHD4S4NVKRWHYOSFT6EXRTMM7Y5EKPAC
Change contents