There's multiple ways to do this, only one of them is right, and I keep forgetting what it is. Turn it into a method.
YJJ4X4JGABMVA5JBQW5UAWI543P3Y7NDVFTOHA6LIDA5KSFGUFNQC
VC2CU2GGRIWXIFJELD5NAELDUIRY5S5LEAFJCM2A5P3CUBYF3Z3AC
HTWAM4NZFOY463TNSKYIM2EWB7QNBGDRRTTGHF5N3Z4TGC7Q3SFAC
WOXIYUTL4NU7ACHQYXEXJDSXCRDLQ2X457KO6C7GEXFQZ43F3L7QC
BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC
SVJZZDC3K6AKAXHGRNAZKRE2ZXEKJANNLG7LSSUZJARFBL5F7C4AC
OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC
end
-- slightly expensive since it redraws the screen
function Text.cursor_past_screen_bottom()
App.draw()
return Cursor_y >= App.screen.height - Line_height
-- this approach is cheaper and almost works, except on the final screen
-- where file ends above bottom of screen
--? local _,botpos = Text.pos_at_start_of_cursor_screen_line()
--? local botline1 = {line=Cursor1.line, pos=botpos}
--? return Text.lt1(Screen_bottom1, botline1)