add state arg to Text.textinput
[?]
Jul 12, 2022, 11:33 PM
3MAZEQK5AR3IJJ2ENHHYDPDICIK645NE5QWR54Z52BHGHE6VR5XQCDependencies
- [2]
LF7BWEG4group all editor globals - [3]
XNFTJHC4split keyboard handling between Text and Drawing - [4]
PFT5Y2ZYmove - [5]
G6OYAYHUpaste in text with M-v - [6]
PTDO2SOTadd state arg to schedule_save - [7]
LNUHQOGHstart passing in Editor_state explicitly - [8]
BYG5CEMVsupport for naming points - [9]
IRCKL6VNextract scrolling logic out of insert_at_cursor - [10]
VJ77YABHmore efficient undo/redo - [11]
AOIRVVJArevert selection logic to before commit 3ffc2ed8f - [12]
JFFUF5ALoverride mouse state lookups in tests - [13]
AVLAYODPmuch simpler - [14]
R5OKMVVCfix a regression in line wrapping - [15]
2ZYV7D3Whandle tab characters - [16]
5UG5PQ6Kundo commit 861c57b533 - [17]
2L5MEZV3experiment: new edit namespace - [18]
DRFE3B3Zmouse buttons are integers, not strings - [*]
BULPIBEGbeginnings of a module for the text editor
Change contents
- replacement in text.lua at line 137
function Text.textinput(t)function Text.textinput(State, t) - replacement in text.lua at line 140
local before = snapshot(Editor_state.cursor1.line)--? print(Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos)local before = snapshot(State.cursor1.line)--? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos) - replacement in text.lua at line 143
if Editor_state.cursor_y >= App.screen.height - Editor_state.line_height thenText.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], Editor_state.margin_left, App.screen.width-Editor_state.margin_right)Text.snap_cursor_to_bottom_of_screen(Editor_state.margin_left, App.screen.width-Editor_state.margin_right)--? print('=>', Editor_state.screen_top1.line, Editor_state.screen_top1.pos, Editor_state.cursor1.line, Editor_state.cursor1.pos, Editor_state.screen_bottom1.line, Editor_state.screen_bottom1.pos)if State.cursor_y >= App.screen.height - State.line_height thenText.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.margin_left, App.screen.width-State.margin_right)Text.snap_cursor_to_bottom_of_screen(State.margin_left, App.screen.width-State.margin_right)--? print('=>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos) - replacement in text.lua at line 148
record_undo_event({before=before, after=snapshot(Editor_state.cursor1.line)})record_undo_event({before=before, after=snapshot(State.cursor1.line)}) - replacement in edit.lua at line 290
Text.textinput(t)Text.textinput(State, t)