OAMKQIRSXVKW5ZNOHWZVQ7IT2T3KXRCV3VUJZIEGWKYYT7I323BAC RHMFC6SUIEQTGGDKZYHZQMS4GPK7CQ3C2TVXY756FXJZFKRF6BJAC CBQCACQIWZORPJXEZSEU3R5QFWUNDW45CYAQVFDMEODTIOEMOU2AC UAEMUIK7HE5YEDG2ZN4WVVRKO6GVPUUR66DQDNYZY6T4TR7P7KHQC TV2KRMN6NOIFK3M2YFU6WZSD6RLBKF6HF67MIJXDX7IV25FYPT2QC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC IX5YTLSVVGQSTXUNGYK526DJ4YWIXO2JRBCOFCANBJJO3ZM2S7ZAC LIKTH6HMT2XAWJX6WM2ZYUUVDLN2H6SLW42GSRNF3ZUYATSJ2LDAC OJGPJGGY5IGUVKBOGXHL6EU6M2SU3OICDIX56RILLTDNNQTYB72AC HESBC35LBCNFWDFRAO6Z4EJ67BCBHCRETCPEJCV2BDPHUJJFY3WQC JOPVPUSAMMU6RFVDQR4NJC4GNNUFB7GPKVH7OS5FKCYS5QZ53VLQC QEXZHD2VPCM4TAPP7PR2K2PIR4BVES5IZWC3T6ZRNJWKWOXFILNQC 7VGDIPLCFDG3PVE4JH3WDKZ4A7PG5UYW7TLFFFOWN2JEUZYYTFJQC 2L5MEZV344TOZLVY3432RHJFIRVXFD6O3GWLL5O4CV66BGAFTURQC 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