line.y -> line_cache.starty in a few more places
[?]
Jul 28, 2022, 3:45 AM
IFTYOERMW7P3I24WISZN35X3GWJ5MSMRYDRBK3L52GCZTPP3CWZQCDependencies
- [2]
MTJEVRJRadd state arg to a few functions - [3]
UHB4GARJleft/right margin -> left/right coordinates - [4]
ILOA5BYFseparate data structure for each line's cache data - [5]
ZLJGZYQGselect text with shift + mouseclick - [6]
3HVBAZPAadd state arg to a few functions - [7]
LF7BWEG4group all editor globals - [8]
SPSW74Y5add state arg to Text.keychord_pressed - [9]
QCPXQ2E3add state arg to a few functions - [10]
APYPFFS3call edit rather than App callbacks in tests - [11]
WAR3HXHTtest both ways of selecting text with mouse - [12]
RMKMPFT5fix a corner case when selecting text - [13]
5ZA3BRNYadd state arg to a few functions - [14]
73OCE2MCafter much struggle, a brute-force undo - [15]
LNUHQOGHstart passing in Editor_state explicitly - [16]
S2MISTTMadd state arg to a few functions - [17]
2L5MEZV3experiment: new edit namespace - [18]
VJ77YABHmore efficient undo/redo - [19]
PTDO2SOTadd state arg to schedule_save - [*]
LXTTOB33extract a couple of files
Change contents
- replacement in undo.lua at line 70
table.insert(event.lines, {mode='drawing', y=line.y, h=line.h, points=points, shapes=shapes, pending={}})--? table.insert(event.lines, {mode='drawing', y=line.y, h=line.h, points=deepcopy(line.points), shapes=deepcopy(line.shapes), pending={}})table.insert(event.lines, {mode='drawing', h=line.h, points=points, shapes=shapes, pending={}})--? table.insert(event.lines, {mode='drawing', h=line.h, points=deepcopy(line.points), shapes=deepcopy(line.shapes), pending={}}) - replacement in text_tests.lua at line 834
edit.draw(Editor_state) -- populate line.y for each line in Editor_state.linesedit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache - replacement in text_tests.lua at line 852
edit.draw(Editor_state) -- populate line.y for each line in Editor_state.linesedit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache - replacement in text_tests.lua at line 873
edit.draw(Editor_state) -- populate line.y for each line in Editor_state.linesedit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache - replacement in text_tests.lua at line 899
edit.draw(Editor_state) -- populate line.y for each line in Editor_state.linesedit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache - replacement in edit.lua at line 289
for _,line in ipairs(State.lines) do line.y = nil end -- just in case we scrollfor _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll - replacement in edit.lua at line 353
for _,line in ipairs(State.lines) do line.y = nil end -- just in case we scrollfor _,line in ipairs(State.lines) do line.starty = nil end -- just in case we scroll - replacement in edit.lua at line 369
for _,line in ipairs(State.lines) do line.y = nil end -- just in case we scrollfor _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll - replacement in edit.lua at line 385
for _,line in ipairs(State.lines) do line.y = nil end -- just in case we scrollfor _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll - replacement in edit.lua at line 391
for _,line in ipairs(State.lines) do line.y = nil end -- just in case we scrollfor _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll - replacement in edit.lua at line 398
for _,line in ipairs(State.lines) do line.y = nil end -- just in case we scrollfor _,line in ipairs(State.lines) do line.starty = nil end -- just in case we scroll - replacement in edit.lua at line 419
-- DON'T reset line.y here-- DON'T reset line_cache.starty here - replacement in edit.lua at line 454
for _,line in ipairs(State.lines) do line.y = nil end -- just in case we scrollfor _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll