keep all text cache writes inside text.lua
[?]
Jul 17, 2022, 5:06 PM
BW2IUB3KA4AKD35DYLCUCUM4Z32FMKGZNUBQBAEDIQJJYPA547MACDependencies
- [2]
WJBZZQE4fold together two largely similar cases - [3]
537TQ2QNsome more logging - [4]
CVGE3SIGI feel confident now that page-down is working. - [5]
M6TH7VSZrip out notion of Line_width - [6]
2L5MEZV3experiment: new edit namespace - [7]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [8]
LNUHQOGHstart passing in Editor_state explicitly - [9]
MXA3RZYKdeduce left/right from state where possible - [10]
3ZSUBI57drop some redundant args from Text.draw - [11]
2POFQQLWkeep cursor on screen when pressing 'down' - [12]
JY4VK7L2rename - [13]
LF7BWEG4group all editor globals - [14]
BULPIBEGbeginnings of a module for the text editor - [15]
X3F7ECSLadd state arg to some functions - [16]
GK47BBCYstart passing left/right margins everywhere - [17]
3TFEAQSWstart using some globals - [18]
4VKEE43Zbugfix - [19]
LXTTOB33extract a couple of files - [20]
73OCE2MCafter much struggle, a brute-force undo
Change contents
- replacement in text.lua at line 9
-- return values:-- y coordinate drawn until in px-- position of start of final screen line drawnfunction Text.draw(State, line_index)-- draw a line starting from startpos to screen at y between State.left and State.right-- return the final y, and position of start of final screen line drawnfunction Text.draw(State, line_index, y, startpos) - edit in text.lua at line 15
line.starty = yline.startpos = startpos - edit in text.lua at line 19
local y = line.starty - replacement in edit.lua at line 133
line.starty = yline.startpos = 1local startpos = 1 - replacement in edit.lua at line 135
line.startpos = State.screen_top1.posstartpos = State.screen_top1.pos - replacement in edit.lua at line 152
y, State.screen_bottom1.pos = Text.draw(State, line_index)y, State.screen_bottom1.pos = Text.draw(State, line_index, y, startpos)