autosave slightly less aggressively

[?]
Jun 17, 2022, 10:42 PM
PX7DDEMOBGPVK3FXKK5XEPG24CJXZSVW67DLG2JZZ5E77NVEAA3AC

Dependencies

  • [2] NQKFQSZE undo creating new drawings
  • [3] 3GFQP6IR stop saving the entire file when modifying drawings
  • [4] SR7L4QPZ revert previous commit
  • [5] 7CLGG7J2 test: autosave after any shape
  • [6] Y4VYNEGF test: autosave after name/move/delete of point
  • [7] 4AXV2HG4 all pending manual tests done!
  • [8] BYG5CEMV support for naming points
  • [9] HMODUNJE scroll on backspace
  • [10] AMSESRTH move some code
  • [11] QVDQMJXV avoid scrolling down if possible
  • [12] 2ENZW7TV select text using mouse drag
  • [13] K464QQR4 more defensive resize handling
  • [14] OGUV4HSA remove some memory leaks from rendered fragments
  • [15] T7IWZFL4 more precise scroll on paste
  • [16] XNFTJHC4 split keyboard handling between Text and Drawing
  • [17] J2SVGR2E experiment: blinking cursor
  • [18] TVM2WIHH bugfix: autosave and undo in a couple of cases
  • [19] IRCKL6VN extract scrolling logic out of insert_at_cursor
  • [20] 252M2QMD forgot to move this special case out
  • [21] IDG26SXK bugfix in commit e51ce12969
  • [22] PHFWIFYK scroll on enter
  • [23] AYE2VEGJ extract a couple of methods
  • [24] JCSLDGAH beginnings of support for multiple shapes
  • [25] OTIBCAUJ love2d scaffold
  • [26] 73OCE2MC after much struggle, a brute-force undo
  • [27] NQWWTGXR switch undo/redo to ctrl- hotkeys
  • [28] SHEGBK4H while we're at it, undo naming points
  • [29] SQLVYKVJ rename
  • [30] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [31] 65XHTZEK regression: couldn't do many drawing operations because line.y was reset
  • [32] CG3264MM move
  • [33] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [34] VC2CU2GG faster paste
  • [35] AVTNUQYR basic test-enabled framework
  • [36] DLQMM265 scroll past first page
  • [37] G3C4FKPR bugfix: missed fixing a callsite
  • [38] LS55YKGW switch copy/paste to ctrl- hotkeys
  • [39] DHCLUDCW .
  • [40] RF5ALVNY allow the window to be resized
  • [41] GN3IF4WF bugfix: pasting newlines
  • [42] BTKAW76L rename
  • [43] SN2QONLI autosave on cut/paste
  • [44] 2ZYV7D3W handle tab characters
  • [45] VJ77YABH more efficient undo/redo
  • [46] Z4XRNDTR find text
  • [47] T7SJSJIH test: undo naming a point
  • [48] JFFUF5AL override mouse state lookups in tests
  • [49] RT6EV6OP delegate update events to drawings
  • [50] DHI6IJCN selecting text and deleting selections
  • [51] 3TDOZESE extract scrolling logic out of insert_return
  • [52] DRFE3B3Z mouse buttons are integers, not strings
  • [53] WIDXZBNW experiment: extremely precise scrolling on paste
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] PGZJ6NAT ensure Filename is writable when opened outside a terminal
  • [*] AD34IX2Z couple more tests
  • [*] KVHUFUFV reorg
  • [*] K2X6G75Z start writing some tests for drawings
  • [*] 42LVB4DE test: naming a point
  • [*] L6XA5EY2 test: moving a point
  • [*] KAUD3YIK tests: deleting points/shapes
  • [*] 7DYUAOI6 test: undo moving point
  • [*] 3QNOKBFM beginnings of a test harness
  • [*] ZLJGZYQG select text with shift + mouseclick
  • [*] JF5L2BBS test harness now supports copy/paste

Change contents

  • replacement in text.lua at line 185
    [8.27][8.100:134](),[8.113][8.100:134](),[8.1130][8.100:134](),[8.972][8.100:134]()
    save_to_disk(Lines, Filename)
    [8.113]
    [8.1422]
    schedule_save()
  • replacement in text.lua at line 196
    [8.195][8.972:1006](),[8.814][8.972:1006](),[8.972][8.972:1006]()
    save_to_disk(Lines, Filename)
    [8.814]
    [8.1548]
    schedule_save()
  • replacement in text.lua at line 201
    [8.8453][8.6714:6750]()
    save_to_disk(Lines, Filename)
    [8.8453]
    [8.8453]
    schedule_save()
  • replacement in text.lua at line 238
    [8.216][8.3000:3034](),[8.3221][8.3000:3034](),[8.3000][8.3000:3034]()
    save_to_disk(Lines, Filename)
    [8.216]
    [8.1774]
    schedule_save()
  • replacement in text.lua at line 243
    [8.8533][8.6932:6968]()
    save_to_disk(Lines, Filename)
    [8.8533]
    [8.8533]
    schedule_save()
  • replacement in text.lua at line 274
    [8.3922][8.3922:3956]()
    save_to_disk(Lines, Filename)
    [8.3922]
    [8.2033]
    schedule_save()
  • edit in main.lua at line 79
    [56.63]
    [57.1567]
    Next_save = nil
  • replacement in main.lua at line 172
    [8.217][8.217:259]()
    Last_resize_time = love.timer.getTime()
    [8.217]
    [8.690]
    Last_resize_time = App.getTime()
  • replacement in main.lua at line 212
    [8.324][8.324:382]()
    if love.timer.getTime() - Last_resize_time < 0.1 then
    [8.324]
    [8.382]
    if App.getTime() - Last_resize_time < 0.1 then
  • replacement in main.lua at line 239
    [8.1148][2.231:284]()
    save_to_disk(Lines, Filename)
    [8.1148]
    [2.284]
    schedule_save()
  • replacement in main.lua at line 276
    [8.512][8.512:570]()
    if love.timer.getTime() - Last_resize_time < 0.1 then
    [8.512]
    [8.570]
    if App.getTime() - Last_resize_time < 0.1 then
  • edit in main.lua at line 283
    [8.24]
    [58.3]
    if Next_save and Next_save < App.getTime() then
    save_to_disk(Lines, Filename)
    Next_save = nil
    end
  • edit in main.lua at line 289
    [58.8]
    [8.1399]
    function schedule_save()
    if Next_save == nil then
    Next_save = App.getTime() + 3 -- short enough that you're likely to still remember what you did
    end
    end
  • replacement in main.lua at line 331
    [8.365][3.174:208]()
    save_to_disk(Lines, Filename)
    [8.365]
    [3.208]
    schedule_save()
  • replacement in main.lua at line 372
    [8.354][8.354:386]()
    save_to_disk(Lines, Filename)
    [8.354]
    [8.3116]
    schedule_save()
  • replacement in main.lua at line 423
    [8.17776][8.7:43]()
    save_to_disk(Lines, Filename)
    [8.17776]
    [8.351]
    schedule_save()
  • replacement in main.lua at line 435
    [8.17869][8.44:80]()
    save_to_disk(Lines, Filename)
    [8.17869]
    [8.38]
    schedule_save()
  • replacement in main.lua at line 450
    [8.289][8.8:42]()
    save_to_disk(Lines, Filename)
    [8.289]
    [8.289]
    schedule_save()
  • replacement in main.lua at line 470
    [8.142][8.43:77](),[4.895][8.43:77](),[8.646][8.43:77]()
    save_to_disk(Lines, Filename)
    [8.646]
    [8.1877]
    schedule_save()
  • replacement in main.lua at line 480
    [8.189][8.189:225]()
    save_to_disk(Lines, Filename)
    [8.189]
    [8.225]
    schedule_save()
  • replacement in main.lua at line 510
    [8.907][8.907:941]()
    save_to_disk(Lines, Filename)
    [8.907]
    [8.5015]
    schedule_save()
  • edit in drawing_tests.lua at line 13
    [5.327]
    [5.327]
    -- file not immediately saved
    App.update(0.01)
    check_nil(App.filesystem['foo'], 'F - test_creating_drawing_saves/early')
    -- wait until save
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in drawing_tests.lua at line 50
    [59.1529]
    [5.502]
    -- wait until save
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in drawing_tests.lua at line 394
    [60.1770]
    [6.34]
    -- wait until save
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in drawing_tests.lua at line 425
    [61.1137]
    [6.215]
    -- wait until save
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in drawing_tests.lua at line 451
    [61.1938]
    [6.471]
    -- wait until save
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in drawing_tests.lua at line 483
    [62.1304]
    [6.701]
    -- wait for some time
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in drawing_tests.lua at line 610
    [8.1995]
    [7.14]
    -- wait until save
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in drawing_tests.lua at line 659
    [63.1992]
    [7.34]
    -- wait until save
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in drawing_tests.lua at line 698
    [7.1685]
    [7.1685]
    -- wait until save
    App.wait_fake_time(3.1)
    App.update(0)
  • edit in app.lua at line 160
    [8.6426]
    [8.6426]
    App.time = 1
    function App.getTime()
    return App.time
    end
    function App.wait_fake_time(t)
    App.time = App.time + t
    end
  • edit in app.lua at line 340
    [57.2680]
    [8.7911]
    App.time = nil
  • edit in app.lua at line 345
    [65.2236]
    [8.5359]
    App.run_after_mouse_click = nil
    App.run_after_mouse_press = nil
    App.run_after_mouse_release = nil
  • edit in app.lua at line 361
    [57.2791]
    [66.2953]
    App.getTime = love.timer.getTime