add state arg to a few functions
[?]
Jul 13, 2022, 12:14 AM
WLJCIXYMSTCNSYCFOEBQNDLBZ5D2Z3WTF4E4WYL5CFGIJ434FKNQCDependencies
- [2]
S2MISTTMadd state arg to a few functions - [3]
F65ADDGLadd state arg to a few functions - [4]
ZHLO7K3Madd args to some functions - [5]
2TQR4PSYadd args to some functions - [6]
LF7BWEG4group all editor globals - [7]
LNUHQOGHstart passing in Editor_state explicitly - [8]
ZPUQSPQPextract a few methods - [9]
QCQTMUZ7add args to some functions - [10]
WOXIYUTLbugfix: manage screen_top and cursor when resizing - [11]
CUIV2LE5some typos - [12]
PIEDOKYQbugfix - [13]
2H67P75Xswitch arg for a function - [14]
62PZGSUCoptimization: moving cursor to next word - [15]
SVJZZDC3snapshot - no, that's all wrong - [16]
YJJ4X4JGbugfix: avoid scrolling on 'end' - [17]
Z5HLXU4Padd state arg to a few functions - [18]
KOYAJWE4extract a couple more methods - [19]
2L5MEZV3experiment: new edit namespace - [20]
4J2L6JMRbugfix: deleting a selection spanning pages - [21]
HTWAM4NZbugfix: scrolling in left/right movements - [22]
UV4EWOLYadd args to some functions - [23]
LXTTOB33extract a couple of files - [24]
KECEMMMRextract couple of functions - [*]
BULPIBEGbeginnings of a module for the text editor
Change contents
- replacement in text.lua at line 406
local screen_line_index,screen_line_starting_pos = Text.pos_at_start_of_cursor_screen_line(left, right)local screen_line_index,screen_line_starting_pos = Text.pos_at_start_of_cursor_screen_line(State, left, right) - replacement in text.lua at line 483
local screen_line_index, screen_line_starting_pos = Text.pos_at_start_of_cursor_screen_line(left, right)local screen_line_index, screen_line_starting_pos = Text.pos_at_start_of_cursor_screen_line(State, left, right) - replacement in text.lua at line 508
local _,botpos = Text.pos_at_start_of_cursor_screen_line(left, right)local _,botpos = Text.pos_at_start_of_cursor_screen_line(State, left, right) - replacement in text.lua at line 510
if Text.cursor_past_screen_bottom() thenif Text.cursor_past_screen_bottom(State) then - replacement in text.lua at line 559
if Text.cursor_past_screen_bottom() thenif Text.cursor_past_screen_bottom(State) then - replacement in text.lua at line 597
if Text.cursor_past_screen_bottom() thenif Text.cursor_past_screen_bottom(State) then - replacement in text.lua at line 619
function Text.pos_at_start_of_cursor_screen_line(left, right)Text.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], left, right)for i=#Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos,1,-1 dolocal spos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos[i]if spos <= Editor_state.cursor1.pos thenfunction Text.pos_at_start_of_cursor_screen_line(State, left, right)Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], left, right)for i=#State.lines[State.cursor1.line].screen_line_starting_pos,1,-1 dolocal spos = State.lines[State.cursor1.line].screen_line_starting_pos[i]if spos <= State.cursor1.pos then - replacement in text.lua at line 976
if Text.cursor_past_screen_bottom() thenif Text.cursor_past_screen_bottom(Editor_state) then - replacement in text.lua at line 988
function Text.cursor_past_screen_bottom()function Text.cursor_past_screen_bottom(State) - replacement in text.lua at line 990
return Editor_state.cursor_y >= App.screen.height - Editor_state.line_heightreturn State.cursor_y >= App.screen.height - State.line_height - replacement in text.lua at line 993
--? local _,botpos = Text.pos_at_start_of_cursor_screen_line(left, right)--? local botline1 = {line=Editor_state.cursor1.line, pos=botpos}--? return Text.lt1(Editor_state.screen_bottom1, botline1)--? local _,botpos = Text.pos_at_start_of_cursor_screen_line(State, left, right)--? local botline1 = {line=State.cursor1.line, pos=botpos}--? return Text.lt1(State.screen_bottom1, botline1) - replacement in select.lua at line 136
_,State.screen_top1.pos = Text.pos_at_start_of_cursor_screen_line(left, right)_,State.screen_top1.pos = Text.pos_at_start_of_cursor_screen_line(State, left, right) - replacement in edit.lua at line 394
if Text.cursor_past_screen_bottom() thenText.snap_cursor_to_bottom_of_screen(State.margin_left, App.screen.height-State.margin_right)if Text.cursor_past_screen_bottom(State) thenText.snap_cursor_to_bottom_of_screen(State, State.margin_left, App.screen.height-State.margin_right)