bugfix

[?]
May 20, 2022, 3:02 PM
76AIXR7HAUL74GYPPFH3N5N4VJWZL67WM4XTKWGSA6ESLIJZPB6QC

Dependencies

  • [2] DAENUOGV eliminate assumptions that line length == size in bytes
  • [3] BULPIBEG beginnings of a module for the text editor
  • [4] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [5] 5Q6NIG66 bugfix
  • [6] XNFTJHC4 split keyboard handling between Text and Drawing
  • [7] DLQMM265 scroll past first page
  • [8] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [9] 5ED3YGHW planning out cursor up/down over wrapped lines

Change contents

  • replacement in text.lua at line 229
    [3.4312][3.4312:4401]()
    Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, old_x, Cursor_pos)
    [3.4312]
    [3.4401]
    Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, old_x)
  • replacement in text.lua at line 245
    [3.4796][3.4796:4885]()
    Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, old_x, Cursor_pos)
    [3.4796]
    [3.4885]
    Cursor_pos = Text.nearest_cursor_pos(Lines[Cursor_line].data, old_x)
  • replacement in text.lua at line 339
    [3.469][3.469:517]()
    function Text.nearest_cursor_pos(line, x, hint)
    [3.469]
    [3.517]
    function Text.nearest_cursor_pos(line, x)
  • edit in text.lua at line 348
    [3.643][3.234:359](),[3.359][3.739:745](),[3.739][3.739:745]()
    if hint then
    local currx = Text.cursor_x(line, hint)
    if currx > x-2 and currx < x+2 then
    return hint
    end
    end
  • edit in text.lua at line 349
    [2.476][3.360:451](),[3.778][3.360:451](),[3.451][3.838:844](),[3.838][3.838:844]()
    if hint then
    if currx > x then
    right = hint
    else
    left = hint
    end
    end