stop handling nil screen_line_starting_pos everywhere
[?]
Jun 10, 2022, 9:57 PM
CBPV5SSIJFGEZLGF7LMC35KZWUTZUFNAWTTVNYDMEEUK4EBOMOVQCDependencies
- [2]
VC2CU2GGfaster paste - [3]
KZ5GAYRPthis fixes the immediate regression - [4]
HYEAFRZ2split mouse_pressed events between Text and Drawing - [5]
JY4VK7L2rename - [6]
3OKKTUT4up and down arrow now moving by screen line where possible - [7]
KECEMMMRextract couple of functions - [8]
XNFTJHC4split keyboard handling between Text and Drawing - [9]
PYGMASTVdisable some debug prints - [10]
P66MRF3Ubugfix: don't append metadata when it already exists - [11]
KOYAJWE4extract a couple more methods - [12]
DLQMM265scroll past first page - [13]
SVJZZDC3snapshot - no, that's all wrong - [14]
6E3HVYWFtest and App helper for mouse clicks - [15]
V5MJRFOZbugfix: down arrow doesn't scroll up unnecessarily - [16]
5L7K4GBDclicking to the right of a wrapped line - [17]
LERERVPHkeep one screen line of overlap on pagedown - [18]
PHQPLJUQrename - [19]
2RXZ3PGObeginning of a new approach to scroll+wrap - [20]
MDXGMZU2disable all debug prints - [21]
OYXDYPGSget rid of debug variables - [22]
H22OAXWEcouple of TODOs - [23]
ZPUQSPQPextract a few methods - [24]
AYE2VEGJextract a couple of methods - [25]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [26]
EGH7XDBKsupport non-text lines in Text.to2 - [27]
ESETRNLBbugfix: printing the first part of a line at the bottom made it seem non-wrapping - [28]
LS55YKGWswitch copy/paste to ctrl- hotkeys - [29]
5FW7YOFThighlight selection while dragging - [30]
U52E2XZNfix a crash - [31]
CVGE3SIGI feel confident now that page-down is working. - [32]
T7IWZFL4more precise scroll on paste - [33]
HOSPP2ANcrisp font rendering - [34]
HIH47LNBdrop unused arg - [35]
PR4KIAZDfirst stab at equally hacky cursor down support - [36]
AIRIP35Zcleaner - [37]
BOFNXP5Gclicking now moves the cursor even on long, wrapped lines - [38]
NQWWTGXRswitch undo/redo to ctrl- hotkeys - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
OTIBCAUJlove2d scaffold
Change contents
- edit in text.lua at line 24
endif line.screen_line_starting_pos == nil thenText.populate_screen_line_starting_pos(line_index) - edit in text.lua at line 25
Text.populate_screen_line_starting_pos(line_index) - edit in text.lua at line 451[4.757]→[4.757:825](∅→∅),[4.825]→[4.5308:5392](∅→∅),[4.5308]→[4.5308:5392](∅→∅),[4.527]→[4.751:779](∅→∅),[4.726]→[4.751:779](∅→∅),[4.831]→[4.751:779](∅→∅),[4.5425]→[4.751:779](∅→∅),[4.751]→[4.751:779](∅→∅)
if Lines[Cursor1.line].screen_line_starting_pos == nil thenCursor1.pos = Text.nearest_cursor_pos(Lines[Cursor1.line].data, Cursor_x)breakend - replacement in text.lua at line 595
if Lines[Cursor1.line].screen_line_starting_pos == nil thenreturn 1,1endText.populate_screen_line_starting_pos(Cursor1.line) - replacement in text.lua at line 606
if Lines[Cursor1.line].screen_line_starting_pos == nil thenreturn trueendText.populate_screen_line_starting_pos(Cursor1.line) - replacement in text.lua at line 673
if line.screen_line_starting_pos == nil then return y < line.y + Line_height endText.populate_screen_line_starting_pos(Cursor1.line) - edit in text.lua at line 679[4.1193]→[4.472:519](∅→∅),[4.7453]→[4.472:519](∅→∅),[4.180]→[4.472:519](∅→∅),[4.519]→[4.1194:1244](∅→∅),[4.1244]→[4.622:628](∅→∅),[4.622]→[4.622:628](∅→∅)
if line.screen_line_starting_pos == nil thenreturn Text.nearest_cursor_pos(line.data, mx)end - replacement in text.lua at line 799
if Lines[pos1.line].screen_line_starting_pos == nil thenText.populate_screen_line_starting_pos(pos1.line)endText.populate_screen_line_starting_pos(pos1.line) - replacement in text.lua at line 853[4.1732]→[4.1732:1778](∅→∅),[4.1778]→[3.469:527](∅→∅),[3.527]→[4.1952:1960](∅→∅),[4.1952]→[4.1952:1960](∅→∅)
if l.screen_line_starting_pos == nil thenText.populate_screen_line_starting_pos(pos2.line-1)endText.populate_screen_line_starting_pos(pos2.line-1) - edit in main.lua at line 444
Text.populate_screen_line_starting_pos(Cursor1.line)