quite the frustrating bugfix

[?]
May 23, 2022, 10:34 PM
JRGTJ2IWQNANG72AGF7NONNQ2LARCG66BY4OVDMGTN65UW2HVA6AC

Dependencies

  • [2] IMEJA43L snapshot
  • [3] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [4] WLHI7KD3 new globals: draw partial screen line up top
  • [5] QYIFOHW3 first test!
  • [6] ESETRNLB bugfix: printing the first part of a line at the bottom made it seem non-wrapping
  • [7] YTSPVDZH first successful pagedown test, first bug found by test
  • [8] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [9] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [10] MGT5FTJ3 first stab at supporting wrapping in cursor up
  • [*] BULPIBEG beginnings of a module for the text editor

Change contents

  • replacement in text.lua at line 28
    [3.62][2.1:44]()
    print(x, frag, frag_width, line_width)
    [3.62]
    [3.2068]
    local s=tostring
    print('('..s(x)..','..s(y)..') '..frag..'('..s(frag_width)..' vs '..s(line_width)..') '..s(line_index)..' vs '..s(Screen_top1.line)..'; '..s(pos)..' vs '..s(Screen_top1.pos))
  • replacement in text.lua at line 32
    [3.2151][2.45:137]()
    -- I no longer remember why the fuck I added this
    [3.2151]
    [3.1]
    -- don't update y above screen top
  • replacement in text.lua at line 45
    [3.115][2.138:202]()
    print(line_index, Screen_top1.line, pos, Screen_top1.pos)
    [3.115]
    [3.115]
    -- if we updated y, check if we're done with the screen
  • replacement in text.lua at line 47
    [3.184][2.203:220](),[2.220][3.109:170](),[3.184][3.109:170]()
    print('a')
    if y + math.floor(15*Zoom) >= App.screen.height then
    [3.184]
    [2.221]
    print('a')
    if y + math.floor(15*Zoom) > App.screen.height then
  • edit in text.lua at line 55
    [3.152]
    [3.152]
    -- don't draw text above screen top