add state arg to a few functions
[?]
Jul 12, 2022, 11:39 PM
Z5HLXU4PJWWJJDBCK52NBD6PIRIA3TAN2BKZB5HBYFGIDBX4F5HACDependencies
- [2]
SPSW74Y5add state arg to Text.keychord_pressed - [3]
3MAZEQK5add state arg to Text.textinput - [4]
GCEF4N3Vstop repeatedly checking for line wrapping - [5]
2ZYV7D3Whandle tab characters - [6]
UV4EWOLYadd args to some functions - [7]
DLQMM265scroll past first page - [8]
PHFWIFYKscroll on enter - [9]
GN3IF4WFbugfix: pasting newlines - [10]
SVJZZDC3snapshot - no, that's all wrong - [11]
UFIUYYYVadditional logging for an active bug - [12]
2TQR4PSYadd args to some functions - [13]
YJJ4X4JGbugfix: avoid scrolling on 'end' - [14]
73OCE2MCafter much struggle, a brute-force undo - [15]
4QQBMWLLregression: typing uppercase letters in text - [16]
IRCKL6VNextract scrolling logic out of insert_at_cursor - [17]
GGJEDJOOadd args to some functions - [18]
XNFTJHC4split keyboard handling between Text and Drawing - [19]
YPHKZVWMextract a new variable - [20]
ESETRNLBbugfix: printing the first part of a line at the bottom made it seem non-wrapping - [21]
HTWAM4NZbugfix: scrolling in left/right movements - [22]
PR4KIAZDfirst stab at equally hacky cursor down support - [23]
AVLAYODPmuch simpler - [24]
V3EABA35skip multiple consecutive whitespace - [25]
2LOQ5ALJadd args to some functions - [26]
G6OYAYHUpaste in text with M-v - [27]
3TDOZESEextract scrolling logic out of insert_return - [28]
EBBFOW4Xbugfix: clear selection in a couple more places - [29]
KECEMMMRextract couple of functions - [30]
VJ77YABHmore efficient undo/redo - [31]
TRNWIQN6more precise height calculation when scrolling up as much as possible while keeping cursor on screen - [32]
ZPUQSPQPextract a few methods - [33]
DHI6IJCNselecting text and deleting selections - [34]
PFT5Y2ZYmove - [35]
ED2FYWDKturns out super- chords to get to textinput - [36]
ZHLO7K3Madd args to some functions - [37]
2CH77LZCadd args to some functions - [38]
OGUV4HSAremove some memory leaks from rendered fragments - [39]
DRFE3B3Zmouse buttons are integers, not strings - [40]
AYE2VEGJextract a couple of methods - [41]
V5MJRFOZbugfix: down arrow doesn't scroll up unnecessarily - [42]
AOIRVVJArevert selection logic to before commit 3ffc2ed8f - [43]
5UG5PQ6Kundo commit 861c57b533 - [44]
2L5MEZV3experiment: new edit namespace - [45]
LNUHQOGHstart passing in Editor_state explicitly - [46]
CVSRHMJ2experiment: slightly adaptive scrolling - [47]
HOSPP2ANcrisp font rendering - [48]
X75QPYVWmove Selection1 clearing past business logic - [49]
BYG5CEMVsupport for naming points - [50]
MP2TBKU6bugfix: crash in Text.up() after return - [51]
62PZGSUCoptimization: moving cursor to next word - [52]
CPZGQT72go through and fix similar issues - [53]
5OALPNN3add args to some functions - [54]
KOYAJWE4extract a couple more methods - [55]
CG3264MMmove - [56]
CUIV2LE5some typos - [57]
VA2ZYFFFbetter fix for commit 3ffc2ed8f - [58]
PX7DDEMOautosave slightly less aggressively - [59]
2H67P75Xswitch arg for a function - [60]
SLLR6KKIbugfix for non-ASCII - [61]
2LC3BM2Nsupport other whitespace chars in word movements - [62]
PYGMASTVdisable some debug prints - [63]
AMSESRTHmove some code - [64]
EMHRPJ3Rno, that's not right - [65]
4KOI3E6Rremove some redundant checks - [66]
SQLVYKVJrename - [67]
QCQTMUZ7add args to some functions - [68]
2RXZ3PGObeginning of a new approach to scroll+wrap - [69]
LF7BWEG4group all editor globals - [70]
KZ5GAYRPthis fixes the immediate regression - [71]
MDXGMZU2disable all debug prints - [*]
BULPIBEGbeginnings of a module for the text editor
Change contents
- replacement in text.lua at line 142[4.78]→[4.1:28](∅→∅),[4.118]→[4.1:28](∅→∅),[3.235]→[4.1:28](∅→∅),[4.1274]→[4.1:28](∅→∅),[4.55973]→[4.1:28](∅→∅),[4.171]→[4.1:28](∅→∅)
Text.insert_at_cursor(t)Text.insert_at_cursor(State, t) - replacement in text.lua at line 151
function Text.insert_at_cursor(t)local byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos)Editor_state.lines[Editor_state.cursor1.line].data = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, 1, byte_offset-1)..t..string.sub(Editor_state.lines[Editor_state.cursor1.line].data, byte_offset)Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line])Editor_state.cursor1.pos = Editor_state.cursor1.pos+1function Text.insert_at_cursor(State, t)local byte_offset = Text.offset(State.lines[State.cursor1.line].data, State.cursor1.pos)State.lines[State.cursor1.line].data = string.sub(State.lines[State.cursor1.line].data, 1, byte_offset-1)..t..string.sub(State.lines[State.cursor1.line].data, byte_offset)Text.clear_cache(State.lines[State.cursor1.line])State.cursor1.pos = State.cursor1.pos+1 - replacement in text.lua at line 165
Text.insert_return()Text.insert_return(State) - replacement in text.lua at line 175[4.227]→[4.163:195](∅→∅),[4.520]→[4.163:195](∅→∅),[2.651]→[4.163:195](∅→∅),[4.1547]→[4.163:195](∅→∅),[4.6602]→[4.163:195](∅→∅),[4.57774]→[4.163:195](∅→∅),[4.163]→[4.163:195](∅→∅)
Text.insert_at_cursor('\t')Text.insert_at_cursor(State, '\t') - replacement in text.lua at line 261
Text.left(State.margin_left, App.screen.width-State.margin_right)Text.left(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 264
Text.right(State.margin_left, App.screen.width-State.margin_right)Text.right(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 270
Text.left(State.margin_left, App.screen.width-State.margin_right)Text.left(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 275
Text.right(State.margin_left, App.screen.width-State.margin_right)Text.right(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 278
Text.word_left(State.margin_left, App.screen.width-State.margin_right)Text.word_left(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 281
Text.word_right(State.margin_left, App.screen.width-State.margin_right)Text.word_right(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 287
Text.word_left(State.margin_left, App.screen.width-State.margin_right)Text.word_left(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 292
Text.word_right(State.margin_left, App.screen.width-State.margin_right)Text.word_right(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 294
Text.start_of_line()Text.start_of_line(State) - replacement in text.lua at line 297
Text.end_of_line(State.margin_left, App.screen.width-State.margin_right)Text.end_of_line(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 303
Text.start_of_line()Text.start_of_line(State) - replacement in text.lua at line 308
Text.end_of_line(State.margin_left, App.screen.width-State.margin_right)Text.end_of_line(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 310
Text.up(State.margin_left, App.screen.width-State.margin_right)Text.up(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 313
Text.down(State.margin_left, App.screen.width-State.margin_right)Text.down(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 319
Text.up(State.margin_left, App.screen.width-State.margin_right)Text.up(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 324
Text.down(State.margin_left, App.screen.width-State.margin_right)Text.down(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 326
Text.pageup(State.margin_left, App.screen.width-State.margin_right)Text.pageup(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 329
Text.pagedown(State.margin_left, App.screen.width-State.margin_right)Text.pagedown(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 335
Text.pageup(State.margin_left, App.screen.width-State.margin_right)Text.pageup(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 340
Text.pagedown(State.margin_left, App.screen.width-State.margin_right)Text.pagedown(State, State.margin_left, App.screen.width-State.margin_right) - replacement in text.lua at line 344
function Text.insert_return()local byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos)table.insert(Editor_state.lines, Editor_state.cursor1.line+1, {mode='text', data=string.sub(Editor_state.lines[Editor_state.cursor1.line].data, byte_offset)})Editor_state.lines[Editor_state.cursor1.line].data = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, 1, byte_offset-1)Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line])Text.clear_cache(Editor_state.lines[Editor_state.cursor1.line+1])Editor_state.cursor1.line = Editor_state.cursor1.line+1Editor_state.cursor1.pos = 1function Text.insert_return(State)local byte_offset = Text.offset(State.lines[State.cursor1.line].data, State.cursor1.pos)table.insert(State.lines, State.cursor1.line+1, {mode='text', data=string.sub(State.lines[State.cursor1.line].data, byte_offset)})State.lines[State.cursor1.line].data = string.sub(State.lines[State.cursor1.line].data, 1, byte_offset-1)Text.clear_cache(State.lines[State.cursor1.line])Text.clear_cache(State.lines[State.cursor1.line+1])State.cursor1.line = State.cursor1.line+1State.cursor1.pos = 1 - replacement in text.lua at line 354
function Text.pageup(left, right)function Text.pageup(State, left, right) - replacement in text.lua at line 357
local top2 = Text.to2(Editor_state.screen_top1, left, right)local top2 = Text.to2(State.screen_top1, left, right) - replacement in text.lua at line 359
local y = App.screen.height - Editor_state.line_heightwhile y >= Editor_state.margin_top dolocal y = App.screen.height - State.line_heightwhile y >= State.margin_top do - replacement in text.lua at line 362
if Editor_state.screen_top1.line == 1 and Editor_state.screen_top1.pos == 1 then break endif Editor_state.lines[Editor_state.screen_top1.line].mode == 'text' theny = y - Editor_state.line_heightelseif Editor_state.lines[Editor_state.screen_top1.line].mode == 'drawing' theny = y - Editor_state.drawing_padding_height - Drawing.pixels(Editor_state.lines[Editor_state.screen_top1.line].h)if State.screen_top1.line == 1 and State.screen_top1.pos == 1 then break endif State.lines[State.screen_top1.line].mode == 'text' theny = y - State.line_heightelseif State.lines[State.screen_top1.line].mode == 'drawing' theny = y - State.drawing_padding_height - Drawing.pixels(State.lines[State.screen_top1.line].h) - replacement in text.lua at line 370
Editor_state.screen_top1 = Text.to1(top2)Editor_state.cursor1.line = Editor_state.screen_top1.lineEditor_state.cursor1.pos = Editor_state.screen_top1.posState.screen_top1 = Text.to1(top2)State.cursor1.line = State.screen_top1.lineState.cursor1.pos = State.screen_top1.pos - replacement in text.lua at line 374
--? print(Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_top1.line, Editor_state.screen_top1.pos)--? print(State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos) - replacement in text.lua at line 378
function Text.pagedown(left, right)function Text.pagedown(State, left, right) - replacement in text.lua at line 383
local top2 = Text.to2(Editor_state.screen_bottom1, left, right)local top2 = Text.to2(State.screen_bottom1, left, right) - replacement in text.lua at line 388
if Text.lt1(Editor_state.screen_top1, new_top1) thenEditor_state.screen_top1 = new_top1if Text.lt1(State.screen_top1, new_top1) thenState.screen_top1 = new_top1 - replacement in text.lua at line 391
Editor_state.screen_top1.line = Editor_state.screen_bottom1.lineEditor_state.screen_top1.pos = Editor_state.screen_bottom1.posState.screen_top1.line = State.screen_bottom1.lineState.screen_top1.pos = State.screen_bottom1.pos - replacement in text.lua at line 394
--? print('setting top to', Editor_state.screen_top1.line, Editor_state.screen_top1.pos)Editor_state.cursor1.line = Editor_state.screen_top1.lineEditor_state.cursor1.pos = Editor_state.screen_top1.pos--? print('setting top to', State.screen_top1.line, State.screen_top1.pos)State.cursor1.line = State.screen_top1.lineState.cursor1.pos = State.screen_top1.pos - replacement in text.lua at line 398
--? print('top now', Editor_state.screen_top1.line)--? print('top now', State.screen_top1.line) - replacement in text.lua at line 403
function Text.up(left, right)assert(Editor_state.lines[Editor_state.cursor1.line].mode == 'text')--? print('up', Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_top1.line, Editor_state.screen_top1.pos)function Text.up(State, left, right)assert(State.lines[State.cursor1.line].mode == 'text')--? print('up', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos) - replacement in text.lua at line 410
local new_cursor_line = Editor_state.cursor1.linelocal new_cursor_line = State.cursor1.line - replacement in text.lua at line 413
if Editor_state.lines[new_cursor_line].mode == 'text' thenif State.lines[new_cursor_line].mode == 'text' then - replacement in text.lua at line 415
Editor_state.cursor1.line = new_cursor_lineText.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], left, right)State.cursor1.line = new_cursor_lineText.populate_screen_line_starting_pos(State.lines[State.cursor1.line], left, right) - replacement in text.lua at line 419
local screen_line_starting_pos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_poslocal screen_line_starting_pos = State.lines[State.cursor1.line].screen_line_starting_pos - replacement in text.lua at line 423
if Editor_state.screen_top1.line > Editor_state.cursor1.line thenEditor_state.screen_top1.line = Editor_state.cursor1.lineEditor_state.screen_top1.pos = screen_line_starting_pos--? print('pos of top of screen is also '..tostring(Editor_state.screen_top1.pos)..' of the same line')if State.screen_top1.line > State.cursor1.line thenState.screen_top1.line = State.cursor1.lineState.screen_top1.pos = screen_line_starting_pos--? print('pos of top of screen is also '..tostring(State.screen_top1.pos)..' of the same line') - replacement in text.lua at line 428
local screen_line_starting_byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, screen_line_starting_pos)local s = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, screen_line_starting_byte_offset)Editor_state.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, Editor_state.cursor_x, left) - 1local screen_line_starting_byte_offset = Text.offset(State.lines[State.cursor1.line].data, screen_line_starting_pos)local s = string.sub(State.lines[State.cursor1.line].data, screen_line_starting_byte_offset)State.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, State.cursor_x, left) - 1 - replacement in text.lua at line 434
if Editor_state.cursor1.line < Editor_state.screen_top1.line thenEditor_state.screen_top1.line = Editor_state.cursor1.lineif State.cursor1.line < State.screen_top1.line thenState.screen_top1.line = State.cursor1.line - replacement in text.lua at line 441
new_screen_line_starting_pos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos[screen_line_index-1]new_screen_line_starting_pos = State.lines[State.cursor1.line].screen_line_starting_pos[screen_line_index-1] - replacement in text.lua at line 443
if Editor_state.screen_top1.line == Editor_state.cursor1.line and Editor_state.screen_top1.pos == screen_line_starting_pos thenEditor_state.screen_top1.pos = new_screen_line_starting_pos--? print('also setting pos of top of screen to '..tostring(Editor_state.screen_top1.pos))if State.screen_top1.line == State.cursor1.line and State.screen_top1.pos == screen_line_starting_pos thenState.screen_top1.pos = new_screen_line_starting_pos--? print('also setting pos of top of screen to '..tostring(State.screen_top1.pos)) - replacement in text.lua at line 447
local new_screen_line_starting_byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, new_screen_line_starting_byte_offset)Editor_state.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, Editor_state.cursor_x, left) - 1--? print('cursor pos is now '..tostring(Editor_state.cursor1.pos))local new_screen_line_starting_byte_offset = Text.offset(State.lines[State.cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(State.lines[State.cursor1.line].data, new_screen_line_starting_byte_offset)State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, State.cursor_x, left) - 1--? print('cursor pos is now '..tostring(State.cursor1.pos)) - replacement in text.lua at line 454
function Text.down(left, right)assert(Editor_state.lines[Editor_state.cursor1.line].mode == 'text')--? print('down', Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos)function Text.down(State, left, right)assert(State.lines[State.cursor1.line].mode == 'text')--? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, State.screen_bottom1.line, State.screen_bottom1.pos) - replacement in text.lua at line 460
local new_cursor_line = Editor_state.cursor1.linewhile new_cursor_line < #Editor_state.lines dolocal new_cursor_line = State.cursor1.linewhile new_cursor_line < #State.lines do - replacement in text.lua at line 463
if Editor_state.lines[new_cursor_line].mode == 'text' thenEditor_state.cursor1.line = new_cursor_lineEditor_state.cursor1.pos = Text.nearest_cursor_pos(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor_x, left)--? print(Editor_state.cursor1.pos)if State.lines[new_cursor_line].mode == 'text' thenState.cursor1.line = new_cursor_lineState.cursor1.pos = Text.nearest_cursor_pos(State.lines[State.cursor1.line].data, State.cursor_x, left)--? print(State.cursor1.pos) - replacement in text.lua at line 470
if Editor_state.cursor1.line > Editor_state.screen_bottom1.line then--? print('screen top before:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos)if State.cursor1.line > State.screen_bottom1.line then--? print('screen top before:', State.screen_top1.line, State.screen_top1.pos) - replacement in text.lua at line 474
--? print('screen top after:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos)--? print('screen top after:', State.screen_top1.line, State.screen_top1.pos) - replacement in text.lua at line 479
if Text.le1(Editor_state.screen_bottom1, Editor_state.cursor1) thenif Text.le1(State.screen_bottom1, State.cursor1) then - replacement in text.lua at line 484
new_screen_line_starting_pos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos[screen_line_index+1]new_screen_line_starting_pos = State.lines[State.cursor1.line].screen_line_starting_pos[screen_line_index+1] - replacement in text.lua at line 486
local new_screen_line_starting_byte_offset = Text.offset(Editor_state.lines[Editor_state.cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(Editor_state.lines[Editor_state.cursor1.line].data, new_screen_line_starting_byte_offset)Editor_state.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, Editor_state.cursor_x, left) - 1--? print('cursor pos is now', Editor_state.cursor1.line, Editor_state.cursor1.pos)local new_screen_line_starting_byte_offset = Text.offset(State.lines[State.cursor1.line].data, new_screen_line_starting_pos)local s = string.sub(State.lines[State.cursor1.line].data, new_screen_line_starting_byte_offset)State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, State.cursor_x, left) - 1--? print('cursor pos is now', State.cursor1.line, State.cursor1.pos) - replacement in text.lua at line 493
--? print('screen top after:', Editor_state.screen_top1.line, Editor_state.screen_top1.pos)--? print('screen top after:', State.screen_top1.line, State.screen_top1.pos) - replacement in text.lua at line 496
--? print('=>', Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos)--? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, State.screen_bottom1.line, State.screen_bottom1.pos) - replacement in text.lua at line 499
function Text.start_of_line()Editor_state.cursor1.pos = 1if Text.lt1(Editor_state.cursor1, Editor_state.screen_top1) thenEditor_state.screen_top1 = {line=Editor_state.cursor1.line, pos=Editor_state.cursor1.pos} -- copyfunction Text.start_of_line(State)State.cursor1.pos = 1if Text.lt1(State.cursor1, State.screen_top1) thenState.screen_top1 = {line=State.cursor1.line, pos=State.cursor1.pos} -- copy - replacement in text.lua at line 506
function Text.end_of_line(left, right)Editor_state.cursor1.pos = utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) + 1function Text.end_of_line(State, left, right)State.cursor1.pos = utf8.len(State.lines[State.cursor1.line].data) + 1 - replacement in text.lua at line 509
local botline1 = {line=Editor_state.cursor1.line, pos=botpos}local botline1 = {line=State.cursor1.line, pos=botpos} - replacement in text.lua at line 515
function Text.word_left(left, right)function Text.word_left(State, left, right) - replacement in text.lua at line 518
if Editor_state.cursor1.pos == 1 thenif State.cursor1.pos == 1 then - replacement in text.lua at line 521
if Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos-1, '%S') thenif Text.match(State.lines[State.cursor1.line].data, State.cursor1.pos-1, '%S') then - replacement in text.lua at line 529
if Editor_state.cursor1.pos == 1 thenif State.cursor1.pos == 1 then - replacement in text.lua at line 532
assert(Editor_state.cursor1.pos > 1)if Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos-1, '%s') thenassert(State.cursor1.pos > 1)if Text.match(State.lines[State.cursor1.line].data, State.cursor1.pos-1, '%s') then - replacement in text.lua at line 539
function Text.word_right(left, right)function Text.word_right(State, left, right) - replacement in text.lua at line 542
if Editor_state.cursor1.pos > utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) thenif State.cursor1.pos > utf8.len(State.lines[State.cursor1.line].data) then - replacement in text.lua at line 545
if Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos, '%S') thenif Text.match(State.lines[State.cursor1.line].data, State.cursor1.pos, '%S') then - replacement in text.lua at line 552
if Editor_state.cursor1.pos > utf8.len(Editor_state.lines[Editor_state.cursor1.line].data) thenif State.cursor1.pos > utf8.len(State.lines[State.cursor1.line].data) then - replacement in text.lua at line 555
if Text.match(Editor_state.lines[Editor_state.cursor1.line].data, Editor_state.cursor1.pos, '%s') thenif Text.match(State.lines[State.cursor1.line].data, State.cursor1.pos, '%s') then - replacement in edit.lua at line 389
Text.insert_return()Text.insert_return(State) - replacement in edit.lua at line 391
Text.insert_at_cursor(c)Text.insert_at_cursor(State, c)