keep all text cache writes inside text.lua
[?]
Jul 17, 2022, 5:06 PM
BW2IUB3KA4AKD35DYLCUCUM4Z32FMKGZNUBQBAEDIQJJYPA547MACDependencies
- [2]
WJBZZQE4fold together two largely similar cases - [3]
BULPIBEGbeginnings of a module for the text editor - [4]
2POFQQLWkeep cursor on screen when pressing 'down' - [5]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [6]
537TQ2QNsome more logging - [7]
LF7BWEG4group all editor globals - [8]
JY4VK7L2rename - [9]
3TFEAQSWstart using some globals - [10]
73OCE2MCafter much struggle, a brute-force undo - [11]
CVGE3SIGI feel confident now that page-down is working. - [12]
4VKEE43Zbugfix - [13]
LXTTOB33extract a couple of files - [14]
2L5MEZV3experiment: new edit namespace - [15]
GK47BBCYstart passing left/right margins everywhere - [16]
LNUHQOGHstart passing in Editor_state explicitly - [17]
X3F7ECSLadd state arg to some functions - [18]
MXA3RZYKdeduce left/right from state where possible - [19]
3ZSUBI57drop some redundant args from Text.draw - [20]
M6TH7VSZrip out notion of Line_width
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)