Merge lines.love
[?]
Mar 17, 2023, 5:53 PM
VN3MTXFKOWZ7J3IZVWM45RT2HFGXTMNITZZRNSZZMY3HLXGOWG5ACDependencies
- [2]
OWYI7OJTMerge upstream - [3]
57OGXVHZMerge lines.love - [4]
7VGDIPLCmore robust state validation - [5]
5STHSG4Uremove some duplication - [6]
KKMFQDR4editing source code from within the app - [7]
LF7BWEG4group all editor globals - [8]
LNUHQOGHstart passing in Editor_state explicitly - [9]
ERQKFTPVextract method - [10]
2CK5QI7Wmake love event names consistent - [11]
2L5MEZV3experiment: new edit namespace - [12]
4KC7I3E2make colors easier to edit
Change contents
- edit in run.lua at line 40
edit.check_locs(Editor_state) - resolve order conflict in run.lua at line 40
- edit in run.lua at line 98
edit.check_locs(Editor_state) - edit in edit.lua at line 113[5.98071]→[5.3867:3868](∅→∅),[5.3867]→[5.3867:3868](∅→∅),[5.3868]→[4.92:528](∅→∅),[5.3868]→[4.92:528](∅→∅)
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)endend - resurrect zombie in edit.lua at line 113
- edit in edit.lua at line 114
function 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)State.cursor1 = {line=i, pos=1}