extract a couple of methods

[?]
May 29, 2022, 6:11 AM
AYE2VEGJ63AWWX76SFQZLOTBIZOQRWBG4AZMIOSVOI2WZVRQJXYAC

Dependencies

  • [2] OYXDYPGS get rid of debug variables
  • [3] HMODUNJE scroll on backspace
  • [4] ZPUQSPQP extract a few methods
  • [5] WLHI7KD3 new globals: draw partial screen line up top
  • [6] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [7] QYIFOHW3 first test!
  • [8] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [9] JY4VK7L2 rename
  • [10] LERERVPH keep one screen line of overlap on pagedown
  • [11] SVJZZDC3 snapshot - no, that's all wrong
  • [12] A2NV3WVO scrolling with up arrow
  • [13] KECEMMMR extract couple of functions
  • [14] JRGTJ2IW quite the frustrating bugfix
  • [15] XNFTJHC4 split keyboard handling between Text and Drawing
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] 3OKKTUT4 up and down arrow now moving by screen line where possible

Change contents

  • replacement in text.lua at line 33
    [5.74][5.74:180]()
    if line_index > Screen_top1.line or (line_index == Screen_top1.line and pos > Screen_top1.pos) then
    [5.74]
    [5.83]
    if Text.lt1(Screen_top1, {line=line_index, pos=pos}) then
  • replacement in text.lua at line 46
    [5.427][5.380:485]()
    if line_index > Screen_top1.line or (line_index == Screen_top1.line and pos >= Screen_top1.pos) then
    [5.427]
    [2.20]
    if Text.le1(Screen_top1, {line=line_index, pos=pos}) then
  • replacement in text.lua at line 940
    [3.2866][3.2866:2982]()
    if Cursor1.line < Screen_top1.line or (Cursor1.line == Screen_top1.line and Cursor1.pos < Screen_top1.pos) then
    [3.2866]
    [3.2982]
    if Text.lt1(Cursor1, Screen_top1) then
  • replacement in text.lua at line 945
    [5.3000][3.3104:3221]()
    assert(Cursor1.line > Screen_top1.line or (Cursor1.line == Screen_top1.line and Cursor1.pos >= Screen_top1.pos))
    [5.3000]
    [5.3000]
    assert(Text.le1(Screen_top1, Cursor1))
  • replacement in text.lua at line 1113
    [4.3772][4.3772:3898]()
    if Cursor1.line > Screen_bottom1.line or (Cursor1.line == Screen_bottom1.line and Cursor1.pos >= Screen_bottom1.pos) then
    [4.3772]
    [4.3898]
    if Text.le1(Screen_bottom1, Cursor1) then
  • edit in text.lua at line 1431
    [5.8443]
    [18.1386]
    end
    function Text.lt1(a, b)
    if a.line < b.line then
    return true
    end
    if a.line > b.line then
    return false
    end
    return a.pos < b.pos
  • edit in text.lua at line 1443
    [18.1391]
    [18.1391]
    function Text.le1(a, b)
    if a.line < b.line then
    return true
    end
    if a.line > b.line then
    return false
    end
    return a.pos <= b.pos
    end