I4S4EFYX6P4RSBCCRAYYXA5MD63T3YINN36LOQXXDKMN7MVS6WNAC 34BZ5ZKNAB4XQGXOPVBZHBDYD5D3X4V6T72XZSR5LJXF4UIVSWQAC T7EAACC5JL5QXAZMDPYUYPA3NE3RBTCZ4RQBOIWSE2RUQ7SPX3AQC O2IL6JT26B6BJ4LHJYWRBY5LICTKXB3QYIS5S7IV4WSIT2EF7HBQC IENTL2ITG2CJE5TRUJGUE65CNC4COAQIQGDMGETZCP5R2VUMS7QQC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC IX5YTLSVVGQSTXUNGYK526DJ4YWIXO2JRBCOFCANBJJO3ZM2S7ZAC LIKTH6HMT2XAWJX6WM2ZYUUVDLN2H6SLW42GSRNF3ZUYATSJ2LDAC NVSC4N4KMUHGX5FEOM2DXYA4VHEEQTP3QNY3D7WY4UONVW5LCT2QC U3MJNFUY4ER65BIKP4D7JGVYWFPXA55KBJYD4RH5KRRKRQXBAW5AC JOPVPUSAMMU6RFVDQR4NJC4GNNUFB7GPKVH7OS5FKCYS5QZ53VLQC 3PSFWAILGRA4OYXWS2DX7VF332AIBPYBXHEA4GIQY2XEJVD65UMAC 7VGDIPLCFDG3PVE4JH3WDKZ4A7PG5UYW7TLFFFOWN2JEUZYYTFJQC 2L5MEZV344TOZLVY3432RHJFIRVXFD6O3GWLL5O4CV66BGAFTURQC PJEQCTBL2ZX5Q7NJQ3KCWSHHBV2QWGYS5NVMRDNK5LOOIIRRIPHAC APX2PY6GAMJSUH7SFSMBFOQJBSAWLLOCKH4L4ZQP2VLHNEXJPREAC MD3W5IRAC6UQALQE4LJC52VQNDO3I3HXF3XE2XHDABXBYJBUVAXQC or edit.invalid_cursor1(State)end-- cursor loc in particular differs from other locs in one way:-- pos might occur just after end of linefunction edit.invalid_cursor1(State)local cursor1 = State.cursor1if cursor1.line > #State.lines then return true endlocal l = State.lines[cursor1.line]if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing linereturn cursor1.pos > #State.lines[cursor1.line].data + 1if State.cursor1.line >= #State.lines thenbreakendif State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1endendfunction edit.cursor_on_text(State)return State.cursor1.line <= #State.linesand State.lines[State.cursor1.line].mode == 'text'endor not edit.cursor_on_text(State)or not Text.le1(State.screen_top1, State.cursor1) thenState.screen_top1 = {line=1, pos=1}State.cursor1 = {line=1, pos=1}edit.put_cursor_on_next_text_line(State)
-- cursor loc in particular differs from other locs in one way:-- pos might occur just after end of linefunction edit.invalid_cursor1(State)local cursor1 = State.cursor1if cursor1.line > #State.lines then return true endlocal l = State.lines[cursor1.line]if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing linereturn cursor1.pos > #State.lines[cursor1.line].data + 1end
if State.cursor1.line >= #State.lines thenbreakendif State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1
if State.cursor1.line >= #State.lines thenbreakendif State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1
if State.next_save and State.next_save < Current_time thenif State.cursor1.line >= #State.lines thenbreakendif State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1