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

new bug: screen_bottom1 might never be written

Scenario: press C-f and search for something. Some of the time we get a crash with this call stack:

Error text.lua:970: attempt to compare nil with number

Traceback [love "callbacks.lua"]:228: in function 'handler' text.lua:970: in function 'lt1' search.lua:72: in function 'search_next' run.lua:985: in function 'search_next_in_pane' run.lua:939: in function 'search_next' run.lua:784: in function 'text_input' main.lua:237: in function <main.lua:230> app.lua:31: in function <app.lua:22> [C]: in function 'xpcall'

Not fixed yet.

The cause: plan_draw is conservative and sometimes tries to render panes that never overlap the viewport.

This bug was exacerbated by fixing the inscript bug which started setting screen_bottom1 to nil. But the problem existed before as well, we just operated on stale screen_bottom1 locations.

This bug doesn't generalize to many other scenarios. It isn't a problem for forks without the surface metaphor, though it might affect driver.love as well. Even in pensieve.love, the only place that uses screen_bottom while spanning multiple editors is find across the entire surface.

Created by  Kartik K. Agaram  on June 10, 2023
HKDQTCZCPWZFU65UTDPOT3RRMTJ2TSWSCOAXFTAWICPD4GKZ3VJQC
Change contents