change a helper slightly
[?]
Sep 15, 2023, 3:46 PM
NVSC4N4KMUHGX5FEOM2DXYA4VHEEQTP3QNY3D7WY4UONVW5LCT2QCDependencies
- [2]
7VGDIPLCmore robust state validation - [3]
IX5YTLSVstate validation in source editor as well - [4]
ERQKFTPVextract method - [5]
SW7BSBMJseveral bugfixes in saving/loading cursor position - [6]
AF253GHLbugfix - [7]
QQBP3G6Wreturn height of editor widget after drawing - [8]
OI4FPFINsupport drawings in the source editor - [9]
B4JEWKWIhide editor cursor while in file navigator - [10]
2L5MEZV3experiment: new edit namespace - [11]
LIKTH6HMupdate stale source X-( - [12]
LNUHQOGHstart passing in Editor_state explicitly - [13]
5STHSG4Uremove some duplication - [14]
KKMFQDR4editing source code from within the app
Change contents
- replacement in source_edit.lua at line 118
edit.put_cursor_on_first_text_line(State)edit.put_cursor_on_next_text_line(State) - replacement in source_edit.lua at line 134[3.714]→[3.714:765](∅→∅),[3.765]→[4.19757:19828](∅→∅),[4.19757]→[4.19757:19828](∅→∅),[4.19828]→[3.766:804](∅→∅),[3.804]→[4.19857:19877](∅→∅),[4.19857]→[4.19857:19877](∅→∅)
function edit.put_cursor_on_first_text_line(State)for i,line in ipairs(State.lines) doif line.mode == 'text' thenState.cursor1 = {line=i, pos=1}breakendfunction edit.put_cursor_on_next_text_line(State)while true doif State.cursor1.line >= #State.lines thenbreak - edit in source_edit.lua at line 139
if State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1end - replacement in edit.lua at line 116
edit.put_cursor_on_first_text_line(State)edit.put_cursor_on_next_text_line(State) - replacement in edit.lua at line 142[2.795]→[2.795:846](∅→∅),[2.846]→[4.221:292](∅→∅),[4.123]→[4.221:292](∅→∅),[4.292]→[2.847:885](∅→∅),[2.885]→[4.321:333](∅→∅),[4.321]→[4.321:333](∅→∅),[4.333]→[4.347:355](∅→∅),[4.347]→[4.347:355](∅→∅)
function edit.put_cursor_on_first_text_line(State)for i,line in ipairs(State.lines) doif line.mode == 'text' thenState.cursor1 = {line=i, pos=1}breakendfunction edit.put_cursor_on_next_text_line(State)while true doif State.cursor1.line >= #State.lines thenbreak - edit in edit.lua at line 147
if State.lines[State.cursor1.line].mode == 'text' thenbreakendState.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1end