port an old fix to source editor
[?]
Sep 17, 2023, 5:40 AM
O2IL6JT26B6BJ4LHJYWRBY5LICTKXB3QYIS5S7IV4WSIT2EF7HBQCDependencies
- [2]
LIKTH6HMupdate stale source X-( - [3]
IX5YTLSVstate validation in source editor as well - [4]
T7EAACC5bugfix to the helper I added yesterday - [5]
KKMFQDR4editing source code from within the app - [6]
NVSC4N4Kchange a helper slightly
Change contents
- replacement in source_edit.lua at line 114
or edit.invalid1(State, State.cursor1)or edit.invalid_cursor1(State) - edit in source_edit.lua at line 128
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