I feel confident now that page-down is working.

[?]
May 22, 2022, 3:52 AM
CVGE3SIGJRGCLY3A2RBPGFXAEKVZXUUIZQLRHJLM4VPUM4SHEZIAC

Dependencies

  • [2] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [3] Y36LOGR5 bugfix: show cursor when past end of line
  • [4] 537TQ2QN some more logging
  • [5] 3TFEAQSW start using some globals
  • [6] 242L3OQX bugfix: ensure Cursor_line is always on a text line
  • [7] EWMPYCDO bugfix
  • [8] UWNHC4AA redo y computations
  • [9] JY4VK7L2 rename
  • [10] 4C375P53 this is a bit clearer
  • [11] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [12] B3IWYWSR delete another arg that can be deduced
  • [13] DAENUOGV eliminate assumptions that line length == size in bytes
  • [14] BULPIBEG beginnings of a module for the text editor
  • [15] XNFTJHC4 split keyboard handling between Text and Drawing
  • [16] DLQMM265 scroll past first page
  • [17] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [18] RTDYYP4H bugfix: text past cursor was rendered red on wrapped lines
  • [19] 5DOC2CBM extract a function
  • [*] WLHI7KD3 new globals: draw partial screen line up top
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • edit in text.lua at line 8
    [3.1568]
    [3.1]
    -- return values:
    -- y coordinate drawn until in px
    -- position of start of final screen line drawn
  • edit in text.lua at line 17
    [3.1818]
    [3.1818]
    local screen_line_starting_pos = 1
  • edit in text.lua at line 31
    [21.119]
    [3.76]
    if y + math.floor(15*Zoom) > Screen_height then
    return y, screen_line_starting_pos
    end
    screen_line_starting_pos = pos
  • replacement in text.lua at line 63
    [3.144][3.2661:2672](),[3.275][3.2661:2672](),[3.310][3.2661:2672](),[3.37][3.2661:2672]()
    return y
    [3.310]
    [3.37]
    return y, screen_line_starting_pos
  • replacement in main.lua at line 144
    [3.213][3.285:337]()
    y = Text.draw(line, Line_width, line_index)
    [3.213]
    [3.56]
    y, Screen_bottom1.pos = Text.draw(line, Line_width, line_index)
  • edit in main.lua at line 149
    [22.416]
    [3.3453]
    --? print('screen bottom: '..tostring(Screen_bottom1.pos)..' in '..tostring(Lines[Screen_bottom1.line].data))
  • replacement in main.lua at line 220
    [2.9533][2.9533:9557]()
    Screen_top1.pos = 1
    [2.9533]
    [2.9557]
    Screen_top1.pos = Screen_bottom1.pos