clean up some prints
[?]
Jul 20, 2022, 2:00 PM
KURLAXXIKHKBL7UDFVIR26BI5FDO3ZFLIQASKVGJRDD3RETTOWNQCDependencies
- [2]
356GY7IQunify two similar functions - [3]
HALS7E5Umore clearly skip prints before screen top - [4]
DHI6IJCNselecting text and deleting selections - [5]
Z4XRNDTRfind text - [6]
4VKEE43Zbugfix - [7]
M6TH7VSZrip out notion of Line_width - [8]
GK47BBCYstart passing left/right margins everywhere - [9]
NDHQN23Gdone passing left/right margins everywhere - [10]
CVGE3SIGI feel confident now that page-down is working. - [11]
JRGTJ2IWquite the frustrating bugfix - [12]
H2DPLWMVsnapshot: wrapping long lines at word boundaries - [13]
IMEJA43Lsnapshot - [14]
4KC7I3E2make colors easier to edit - [15]
S2MISTTMadd state arg to a few functions - [16]
LERERVPHkeep one screen line of overlap on pagedown - [17]
3TFEAQSWstart using some globals - [18]
QYIFOHW3first test! - [19]
BULPIBEGbeginnings of a module for the text editor - [20]
MDXGMZU2disable all debug prints - [21]
GL4Q5WCVkeep text from overflowing right margin - [22]
ODLKHO7Bswitch to line index in a function - [23]
YTSPVDZHfirst successful pagedown test, first bug found by test - [24]
HIKLULFQextract a function - [25]
MXA3RZYKdeduce left/right from state where possible - [26]
XOAHJ6M3similar tests for cursor up - [27]
HOSPP2ANcrisp font rendering - [28]
OYXDYPGSget rid of debug variables - [29]
MP2TBKU6bugfix: crash in Text.up() after return - [30]
DGK5BPVIbugfix: UTF-8 in compute_fragments - [31]
2ZRC7FUL. - [32]
5DOTWNVMright margin - [33]
2H67P75Xswitch arg for a function - [34]
ULKLJBN6couple of renames - [35]
UV4EWOLYadd args to some functions - [36]
3ZSUBI57drop some redundant args from Text.draw - [37]
PFT5Y2ZYmove - [38]
HGC5RGJPswitch to line index in a function - [39]
AYE2VEGJextract a couple of methods - [40]
CBPV5SSIstop handling nil screen_line_starting_pos everywhere - [41]
XNFTJHC4split keyboard handling between Text and Drawing - [42]
JY4VK7L2rename - [43]
WLHI7KD3new globals: draw partial screen line up top - [44]
ESETRNLBbugfix: printing the first part of a line at the bottom made it seem non-wrapping - [45]
U7M4M2F7bugfix: don't rely on Screen_bottom1 while scrolling - [46]
LAW2O3NWextract variable Margin_left - [47]
LF7BWEG4group all editor globals - [48]
A2NV3WVOscrolling with up arrow - [49]
X3F7ECSLadd state arg to some functions - [50]
BW2IUB3Kkeep all text cache writes inside text.lua - [51]
ILOA5BYFseparate data structure for each line's cache data
Change contents
- edit in text.lua at line 12[4.41]→[4.1129:1166](∅→∅),[4.52]→[4.1129:1166](∅→∅),[4.58]→[4.1129:1166](∅→∅),[4.65]→[4.1129:1166](∅→∅),[4.214]→[4.1129:1166](∅→∅),[4.742]→[4.1129:1166](∅→∅),[4.50]→[4.1129:1166](∅→∅)
--? print('text.draw', line_index) - edit in text.lua at line 25[4.50]→[4.1:19](∅→∅),[4.56]→[4.1:19](∅→∅),[4.63]→[4.1:19](∅→∅),[4.63]→[4.1:19](∅→∅),[4.208]→[4.1:19](∅→∅),[4.109]→[4.1:19](∅→∅)
--? print('--') - replacement in text.lua at line 28
--? local s=tostring--? print('('..s(x)..','..s(y)..') '..frag..'('..s(frag_width)..' vs '..s(right)..') '..s(line_index)..' vs '..s(State.screen_top1.line)..'; '..s(pos)..' vs '..s(State.screen_top1.pos)..'; bottom: '..s(State.screen_bottom1.line)..'/'..s(State.screen_bottom1.pos))--? print('text.draw:', frag, 'at', line_index,pos, 'after', x,y) - edit in text.lua at line 39[4.127]→[4.420:499](∅→∅),[4.497]→[4.420:499](∅→∅),[4.54580]→[4.420:499](∅→∅),[4.420]→[4.420:499](∅→∅)
--? print('b', y, App.screen.height, '=>', screen_line_starting_pos) - edit in text.lua at line 42
--? print('text: new screen line', y, App.screen.height, screen_line_starting_pos) - edit in text.lua at line 48
--? print('drawing '..frag) - replacement in text.lua at line 89
--? print('compute_fragments', State.right)--? print('compute_fragments', line_index, 'between', State.left, State.right) - edit in text.lua at line 99[4.231]→[4.380:453](∅→∅),[4.288]→[4.380:453](∅→∅),[4.1292]→[4.380:453](∅→∅),[4.3899]→[4.380:453](∅→∅),[4.380]→[4.380:453](∅→∅)
--? print('frag: ^'..frag..'$ is '..tostring(frag_width)..'px wide') - replacement in text.lua at line 101
--? print(x, frag, frag_width, State.right)--? print(('checking whether to split fragment ^%s$ of width %d when rendering from %d'):format(frag, frag_width, x)) - replacement in text.lua at line 103
--? print(frag, x, frag_width, State.right)--? print('splitting') - edit in text.lua at line 107
--? print('bpos', bpos) - replacement in text.lua at line 110
--? print('space for '..tostring(bpos)..' graphemes, '..tostring(boffset)..' bytes')--? print('space for '..tostring(bpos)..' graphemes, '..tostring(boffset-1)..' bytes') - replacement in text.lua at line 114
--? print(frag, x, frag1_width, State.right)--? print('extracting ^'..frag1..'$ of width '..tostring(frag1_width)..'px') - edit in text.lua at line 116[4.590]→[4.998:1082](∅→∅),[4.695]→[4.998:1082](∅→∅),[4.951]→[4.998:1082](∅→∅),[4.1739]→[4.998:1082](∅→∅),[4.4452]→[4.998:1082](∅→∅),[4.7084]→[4.998:1082](∅→∅),[4.998]→[4.998:1082](∅→∅)
--? print('inserting '..frag1..' of width '..tostring(frag1_width)..'px') - replacement in text.lua at line 125
--? print('inserting '..frag..' of width '..tostring(frag_width)..'px')--? print('inserting ^'..frag..'$ of width '..tostring(frag_width)..'px') - replacement in text.lua at line 804
--? print('-- nearest_pos_less_than', line, x)--? print('', '-- nearest_pos_less_than', line, x) - replacement in text.lua at line 818[4.335]→[4.7596:7652](∅→∅),[2.1412]→[4.7596:7652](∅→∅),[4.3656]→[4.7596:7652](∅→∅),[4.7596]→[4.7596:7652](∅→∅)
--? print(x, left, right, curr, currxmin, currxmax)--? print('', x, left, right, curr, currxmin, currxmax)