more defensive resize handling

[?]
Jun 8, 2022, 4:51 AM
K464QQR4FTXFUMHFWAGOD5DJ6YHUBUKRHLXF2ORE74DVT7TVQ35QC

Dependencies

  • [2] NP7PIUBT bugfix: restore state after C-f (find)
  • [3] RF5ALVNY allow the window to be resized
  • [4] AJB4LFRB try to maintain a reasonable line width
  • [*] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [*] BYG5CEMV support for naming points
  • [*] OTIBCAUJ love2d scaffold
  • [*] 73OCE2MC after much struggle, a brute-force undo
  • [*] DHCLUDCW .
  • [*] AVTNUQYR basic test-enabled framework
  • [*] RT6EV6OP delegate update events to drawings

Change contents

  • edit in manual_tests at line 38
    [7.128]
    resize:
    create a file containing a long line of characters without spaces. try
    resizing the window vertically and horizontally, as far as possible.
  • edit in main.lua at line 81
    [2.455]
    [9.8163]
    -- resize
    Last_resize_time = nil
  • replacement in main.lua at line 154
    [3.540][3.540:690]()
    -- Should I Text.redraw_all() here to reset text fragments? It doesn't seem
    -- to be needed, based on repeatedly resizing the window up and down.
    [3.540]
    [3.690]
    Text.redraw_all()
    Last_resize_time = love.timer.getTime()
  • edit in main.lua at line 189
    [8.336]
    [10.5]
    -- some hysteresis while resizing
    if Last_resize_time then
    if love.timer.getTime() - Last_resize_time < 0.1 then
    return
    else
    Last_resize_time = nil
    end
    end
  • edit in main.lua at line 247
    [11.1398]
    [12.3]
    -- some hysteresis while resizing
    if Last_resize_time then
    if love.timer.getTime() - Last_resize_time < 0.1 then
    return
    else
    Last_resize_time = nil
    end
    end