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.
HKDQTCZCPWZFU65UTDPOT3RRMTJ2TSWSCOAXFTAWICPD4GKZ3VJQC NP5DODWMHP22MO6Z3B6NYDR7C3DLV2BD4NKT2RFFFOSIDPC3ZPWQC 2H76FV5SK3ZWFVQ6ISAOSUJQWW4SSNPRDEI75JIQAJRPIVWPOCDAC WM6R2UKQ3UUZRT2CQMLEB5YZ4NNAV7Z4P4QPOKYZWBWX2MEGCYFQC AYE2VEGJ63AWWX76SFQZLOTBIZOQRWBG4AZMIOSVOI2WZVRQJXYAC BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC 5ZA3BRNYWKSGEBJ4JLA4UBC3LJPT5JBWYCU7PQYRSGX6MJMEWDIQC MSOQI3A5BC5PY2MZXZQAQ4EQDT4KICQJPN3YUZVDYTWXSPZWBLIAC LXTTOB33N2HCUZFIUDRQGGBVHK2HODRG4NBLH6RXRQZDCHF27BSAC 3U6YMMN2GMRL27TLPE7V3KUGM6MI2L3SAQSNU6HMNRINVXVRL3QAC KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC UAX3KJOIN3XBSLKP4IAWAWSCI3DLDKF22A6HRMGA4FHY3AS2QRVAC GR4RROJFJOGM2WLQSVK5R5UYD7IK6ITF6UP5RVHAHD3J4OFJWGCAC GO534NHJW3FC4FNJXTA5QZYZJ5A7UHVTGPNB7G73GA2YJRX4D54AC AEIAYEN3YCCNVDKAQSFBJW75DAUQOJKNIP7JDO34CJ67V34PDK3QC ZBC6KQCAR727UGTWBHRXVDMGAAZIYIY4IX6JRKLDSXSPQ2Z2HOCAC JMUE7GSN6QDQZ6NDRB55MRJMKJN6LBD6MVQPKROYPDOIXM7I3XNQC LNUHQOGHIOFGJXNGA3DZLYEASLYYDGLN2I3EDZY5ANASQAHCG3YQC PP2IIHL6EK4HBFFSYAQNV35BKIK6D4EL2JQOY7NZVJX2DXCLSMGAC 2L5MEZV344TOZLVY3432RHJFIRVXFD6O3GWLL5O4CV66BGAFTURQC 4BX4GJEWW7Z5LA4SJUXADYLAHOYFL4IBOYH4J4DJYRAVKKGGFHGQC --? print('plan draw')--? print(#Surface, 'columns;', num_panes(), 'panes')
print_and_log(('plan_draw %d,%d'):format(Display_settings.x, Display_settings.y))