bugfix: restore state after C-f (find)

[?]
Jun 3, 2022, 8:59 PM
NP7PIUBTR4K6SWJS46YZG3H2RYYNRGNEJMPV4I24TQXT5O3YT27QC

Dependencies

  • [2] TKFSYQ2Z up arrow to search previous
  • [3] DHI6IJCN selecting text and deleting selections
  • [4] Z4XRNDTR find text
  • [5] HOSPP2AN crisp font rendering
  • [6] AVTNUQYR basic test-enabled framework
  • [7] 5FW7YOFT highlight selection while dragging
  • [8] 73OCE2MC after much struggle, a brute-force undo
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • replacement in text.lua at line 156
    [2.130][2.130:220]()
    Cursor1.line = Search_backup_cursor1.line
    Cursor1.pos = Search_backup_cursor1.pos
    [2.130]
    [2.220]
    Cursor1.line = Search_backup.cursor.line
    Cursor1.pos = Search_backup.cursor.pos
    Screen_top1.line = Search_backup.screen_top.line
    Screen_top1.pos = Search_backup.screen_top.pos
  • replacement in text.lua at line 196
    [2.941][3.2232:2322](),[3.2232][3.2232:2322]()
    Cursor1.line = Search_backup_cursor1.line
    Cursor1.pos = Search_backup_cursor1.pos
    [2.941]
    [3.2322]
    Cursor1.line = Search_backup.cursor.line
    Cursor1.pos = Search_backup.cursor.pos
    Screen_top1.line = Search_backup.screen_top.line
    Screen_top1.pos = Search_backup.screen_top.pos
  • replacement in main.lua at line 80
    [3.2590][3.2590:2680]()
    Search_backup_cursor1 = nil -- where to position the cursor if search term was not found
    [3.2590]
    [3.8163]
    Search_backup = nil -- stuff to restore when cancelling search
  • replacement in main.lua at line 252
    [3.3190][3.3190:3262]()
    Cursor1 = Search_backup_cursor1
    Search_backup_cursor1 = nil
    [3.3190]
    [3.3262]
    Cursor1 = Search_backup.cursor
    Screen_top1 = Search_backup.screen_top
    Search_backup = nil
  • edit in main.lua at line 258
    [3.3344]
    [3.3344]
    Search_backup = nil
  • replacement in main.lua at line 273
    [3.3723][3.3723:3788]()
    Search_backup_cursor1 = {line=Cursor1.line, pos=Cursor1.pos}
    [3.3723]
    [3.3788]
    Search_backup = {cursor={line=Cursor1.line, pos=Cursor1.pos}, screen_top={line=Screen_top1.line, pos=Screen_top1.pos}}