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

holy fuck

The sequence of events is as follows:

  • down arrow is pressed
  • cursor is already at bottom of screen, so we compute a new screen_top
  • ==> in doing so, we depend on pane.top <==
  • after setting screen_top we return
  • the surface calls plan_draw
  • ==> plan_draw updates pane.top <==

Now drawing from the new pane.top no longer draws the screen line with the cursor, where the old one would have. And this can happen with just a few pixels of difference. You had x pixels of slack when you set screen_top. If plan_draw just adjusts things by more than x pixels, game over.

I should give up programming and become a hermit, for getting myself into this situation with so much promiscuously mutating global state.

Created by  Kartik K. Agaram  on August 16, 2022
IFGHOCUOIAKC722BNCIRNE2EDMGF77FBTYS57H5UWN6YXOLSZHQQC
Change contents