In-progress browser for a directory of text files

bugfix

scenario: definition extends above and below viewport position cursor at bottom of viewport press down arrow

Before this commit, the viewport would sometimes not scroll, and the cursor would go out of view.

I spent 4 days agonizing over this and working up the courage to think about it, then a whole day trying to make sense of scrolling and deeply questioning my right to tell anyone anything about programming, and it's too early to say I understand this fix. Regardless, it seems clear that the interplay between edit.lua and update_editor_box and schema1_to_y is deeply subtle and likely hiding more bugs.

There's still one open issue: definition starts halfway down the viewport and extends down below viewport position cursor at bottom of viewport press down arrow

The surface jarringly scrolls way more than it needs to just to keep the cursor in view.

And I'm terrified to try to fix this.

Then again, perhaps I should try to port over bring_cursor_of_cursor_pane_in_view from pensieve.love. That might get rid of this abyss.

Created by  Kartik K. Agaram  on October 22, 2023
AB5BX5HOUTUMJHUOONSYJMZ2DI4DWKIE2Z3NZZ7JAUKZFQARPMMQC
Change contents