state validation in source editor as well
[?]
Mar 17, 2023, 5:46 PM
IX5YTLSVVGQSTXUNGYK526DJ4YWIXO2JRBCOFCANBJJO3ZM2S7ZACDependencies
- [2]
A23MMLJHmigrate old settings, attempt #3 - [3]
KKMFQDR4editing source code from within the app - [4]
ZJOSQFN6bugfix: path munging on Windows - [5]
B4JEWKWIhide editor cursor while in file navigator - [6]
OI4FPFINsupport drawings in the source editor
Change contents
- replacement in source_edit.lua at line 118
function edit.fixup_cursor(State)function edit.check_locs(State)-- if State is inconsistent (i.e. file changed by some other program),-- throw away all cursor state entirelyif edit.invalid1(State, State.screen_top1)or edit.invalid1(State, State.cursor1)or not edit.cursor_on_text(State)or not Text.le1(State.screen_top1, State.cursor1) thenState.screen_top1 = {line=1, pos=1}edit.put_cursor_on_first_text_line(State)endendfunction edit.invalid1(State, loc1)return loc1.line > #State.linesor loc1.pos > #State.lines[loc1.line].dataendfunction edit.cursor_on_text(State)return State.cursor1.line <= #State.linesand State.lines[State.cursor1.line].mode == 'text'endfunction edit.put_cursor_on_first_text_line(State) - replacement in source_edit.lua at line 143
State.cursor1.line = iState.cursor1 = {line=i, pos=1} - edit in source.lua at line 90
edit.check_locs(Editor_state)