O2IL6JT26B6BJ4LHJYWRBY5LICTKXB3QYIS5S7IV4WSIT2EF7HBQC 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 + 1