Merge lines.love
[?]
Aug 18, 2022, 8:11 PM
TACI4LU622F462UCH5ZKSFT24NFT7EBA7GBXSHZ24IN2LEQOZNQACDependencies
- [2]
EFSO7K7SMerge lines.love - [3]
GNQC72UXgeneralize a function - [4]
2LEXWUW3get rid of some ridiculous code - [5]
Z5HLXU4Padd state arg to a few functions - [6]
WLJCIXYMadd state arg to a few functions - [7]
2TQR4PSYadd args to some functions - [8]
LF7BWEG4group all editor globals - [9]
SVJZZDC3snapshot - no, that's all wrong - [10]
MXA3RZYKdeduce left/right from state where possible - [11]
PR4KIAZDfirst stab at equally hacky cursor down support - [12]
MD3W5IRAnew fork: rip out drawing support - [13]
MUJTM6REbring back a level of wrapping - [14]
NHNP76LGswap return values - [15]
S63M6DMQdead code - [16]
ELJNEPW2simplify cursor-on-screen check - [17]
CPZGQT72go through and fix similar issues - [18]
TGHAJBESuse line cache for drawings as well - [19]
MDXGMZU2disable all debug prints - [20]
V5MJRFOZbugfix: down arrow doesn't scroll up unnecessarily - [21]
ZPUQSPQPextract a few methods - [22]
HTWAM4NZbugfix: scrolling in left/right movements - [23]
MP2TBKU6bugfix: crash in Text.up() after return - [24]
T57DTBX6add args to some functions - [25]
XNFTJHC4split keyboard handling between Text and Drawing - [*]
BULPIBEGbeginnings of a module for the text editor
Change contents
- edit in text.lua at line 429[5.4502]→[5.4502:4881](∅→∅),[5.1705]→[5.2443:2453](∅→∅),[5.4881]→[5.2443:2453](∅→∅),[5.2443]→[5.2443:2453](∅→∅)
--? print('previous screen line starts at pos '..tostring(screen_line_starting_pos)..' of its 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')end - resurrect zombie in text.lua at line 437
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) - edit in text.lua at line 495[5.4849]→[2.4:4](∅→∅),[5.4849]→[2.4:4](∅→∅),[2.4]→[5.209:273](∅→∅),[5.7851]→[5.209:273](∅→∅),[5.7851]→[5.209:273](∅→∅)
local botpos = Text.pos_at_start_of_cursor_screen_line(State)