clean up some prints

[?]
Jul 20, 2022, 2:00 PM
KURLAXXIKHKBL7UDFVIR26BI5FDO3ZFLIQASKVGJRDD3RETTOWNQC

Dependencies

  • [2] 356GY7IQ unify two similar functions
  • [3] HALS7E5U more clearly skip prints before screen top
  • [4] DHI6IJCN selecting text and deleting selections
  • [5] Z4XRNDTR find text
  • [6] 4VKEE43Z bugfix
  • [7] M6TH7VSZ rip out notion of Line_width
  • [8] GK47BBCY start passing left/right margins everywhere
  • [9] NDHQN23G done passing left/right margins everywhere
  • [10] CVGE3SIG I feel confident now that page-down is working.
  • [11] JRGTJ2IW quite the frustrating bugfix
  • [12] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [13] IMEJA43L snapshot
  • [14] 4KC7I3E2 make colors easier to edit
  • [15] S2MISTTM add state arg to a few functions
  • [16] LERERVPH keep one screen line of overlap on pagedown
  • [17] 3TFEAQSW start using some globals
  • [18] QYIFOHW3 first test!
  • [19] BULPIBEG beginnings of a module for the text editor
  • [20] MDXGMZU2 disable all debug prints
  • [21] GL4Q5WCV keep text from overflowing right margin
  • [22] ODLKHO7B switch to line index in a function
  • [23] YTSPVDZH first successful pagedown test, first bug found by test
  • [24] HIKLULFQ extract a function
  • [25] MXA3RZYK deduce left/right from state where possible
  • [26] XOAHJ6M3 similar tests for cursor up
  • [27] HOSPP2AN crisp font rendering
  • [28] OYXDYPGS get rid of debug variables
  • [29] MP2TBKU6 bugfix: crash in Text.up() after return
  • [30] DGK5BPVI bugfix: UTF-8 in compute_fragments
  • [31] 2ZRC7FUL .
  • [32] 5DOTWNVM right margin
  • [33] 2H67P75X switch arg for a function
  • [34] ULKLJBN6 couple of renames
  • [35] UV4EWOLY add args to some functions
  • [36] 3ZSUBI57 drop some redundant args from Text.draw
  • [37] PFT5Y2ZY move
  • [38] HGC5RGJP switch to line index in a function
  • [39] AYE2VEGJ extract a couple of methods
  • [40] CBPV5SSI stop handling nil screen_line_starting_pos everywhere
  • [41] XNFTJHC4 split keyboard handling between Text and Drawing
  • [42] JY4VK7L2 rename
  • [43] WLHI7KD3 new globals: draw partial screen line up top
  • [44] ESETRNLB bugfix: printing the first part of a line at the bottom made it seem non-wrapping
  • [45] U7M4M2F7 bugfix: don't rely on Screen_bottom1 while scrolling
  • [46] LAW2O3NW extract variable Margin_left
  • [47] LF7BWEG4 group all editor globals
  • [48] A2NV3WVO scrolling with up arrow
  • [49] X3F7ECSL add state arg to some functions
  • [50] BW2IUB3K keep all text cache writes inside text.lua
  • [51] ILOA5BYF separate 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
    [4.37][4.1:26](),[4.62][4.1:26](),[4.26][4.66:334]()
    --? 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))
    [4.37]
    [3.3]
    --? 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
    [4.294][4.557:648]()
    --? print('text: new screen line', y, App.screen.height, screen_line_starting_pos)
  • edit in text.lua at line 48
    [4.128][4.20:54](),[4.1066][4.20:54](),[4.485][4.20:54]()
    --? print('drawing '..frag)
  • replacement in text.lua at line 89
    [4.101][4.101:147]()
    --? print('compute_fragments', State.right)
    [4.101]
    [4.147]
    --? 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
    [4.374][4.374:426]()
    --? print(x, frag, frag_width, State.right)
    [4.374]
    [4.426]
    --? 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
    [4.462][4.462:516]()
    --? print(frag, x, frag_width, State.right)
    [4.462]
    [4.571]
    --? print('splitting')
  • edit in text.lua at line 107
    [4.590]
    [4.833]
    --? print('bpos', bpos)
  • replacement in text.lua at line 110
    [4.77][4.1010:1105](),[4.1010][4.1010:1105]()
    --? print('space for '..tostring(bpos)..' graphemes, '..tostring(boffset)..' bytes')
    [4.77]
    [4.1105]
    --? print('space for '..tostring(bpos)..' graphemes, '..tostring(boffset-1)..' bytes')
  • replacement in text.lua at line 114
    [4.2993][4.591:646]()
    --? print(frag, x, frag1_width, State.right)
    [4.2993]
    [4.646]
    --? 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
    [4.1407][4.1407:1485]()
    --? print('inserting '..frag..' of width '..tostring(frag_width)..'px')
    [4.1407]
    [4.4068]
    --? print('inserting ^'..frag..'$ of width '..tostring(frag_width)..'px')
  • replacement in text.lua at line 804
    [4.3469][4.3469:3518]()
    --? print('-- nearest_pos_less_than', line, x)
    [4.3469]
    [4.7235]
    --? 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)
    [2.1412]
    [4.7652]
    --? print('', x, left, right, curr, currxmin, currxmax)