extract scrolling logic out of insert_at_cursor

[?]
Jun 10, 2022, 6:29 PM
IRCKL6VNSFB7TQEKPQUPJCN37N5QW7D54DSZMESVXGK7NEHGSIPAC

Dependencies

  • [2] QKAMUWSB another bugfix in scrolling while inserting text
  • [3] 5ZFHMYQI .
  • [4] UFIUYYYV additional logging for an active bug
  • [5] 73OCE2MC after much struggle, a brute-force undo
  • [6] NZKYPBSK check for scroll when just typing
  • [7] KOTI3MFG bugfix in previous commit
  • [8] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [9] 2ZYV7D3W handle tab characters
  • [10] XNFTJHC4 split keyboard handling between Text and Drawing
  • [11] WY3JD6W6 bugfix
  • [12] SLLR6KKI bugfix for non-ASCII
  • [13] VJ77YABH more efficient undo/redo
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] OTIBCAUJ love2d scaffold
  • [*] LS55YKGW switch copy/paste to ctrl- hotkeys

Change contents

  • edit in text.lua at line 147
    [5.1274]
    [5.1]
    --? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
  • edit in text.lua at line 149
    [5.28]
    [5.1275]
    if Cursor_y >= App.screen.height - Line_height then
    Text.populate_screen_line_starting_pos(Cursor1.line)
    Text.snap_cursor_to_bottom_of_screen()
    --? print('=>', Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
    end
  • edit in text.lua at line 158
    [5.99][4.3:118]()
    --? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
  • edit in text.lua at line 172
    [5.763][2.1149:1203](),[2.1203][5.1584:1684](),[5.1584][5.1584:1684](),[5.1684][5.409:532](),[5.532][5.1684:1690](),[5.1684][5.1684:1690]()
    if Cursor_y >= App.screen.height - Line_height then
    Text.populate_screen_line_starting_pos(Cursor1.line)
    Text.snap_cursor_to_bottom_of_screen()
    --? print('=>', Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
    end
  • edit in text.lua at line 189
    [5.1547]
    [5.163]
    --? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
  • edit in text.lua at line 191
    [5.195]
    [5.972]
    if Cursor_y >= App.screen.height - Line_height then
    Text.populate_screen_line_starting_pos(Cursor1.line)
    Text.snap_cursor_to_bottom_of_screen()
    --? print('=>', Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
    end
  • edit in main.lua at line 428
    [17.802]
    [3.8]
    --? print(Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
  • edit in main.lua at line 430
    [3.41]
    [17.849]
    if Cursor_y >= App.screen.height - Line_height then
    Text.populate_screen_line_starting_pos(Cursor1.line)
    Text.snap_cursor_to_bottom_of_screen()
    --? print('=>', Screen_top1.line, Screen_top1.pos, Cursor1.line, Cursor1.pos, Screen_bottom1.line, Screen_bottom1.pos)
    end