consistently schedule_save after all mutations

akkartik
Jul 17, 2024, 4:32 AM
GX5PD3CLX63YPRCVKQTLSPDZTBWLZFJ4G6LJTPSMR6UGXFBM4AYAC

Dependencies

  • [2] G3DLS5OU audit all asserts
  • [3] 2CK5QI7W make love event names consistent
  • [4] JYB3RFWH bugfix in source editor
  • [5] KMSL74GA support selections in the source editor
  • [6] 2L5MEZV3 experiment: new edit namespace
  • [7] LF7BWEG4 group all editor globals
  • [8] 537TQ2QN some more logging
  • [9] OI4FPFIN support drawings in the source editor
  • [10] 2ZYV7D3W handle tab characters
  • [11] CG3264MM move
  • [12] UHB4GARJ left/right margin -> left/right coordinates
  • [13] MP2TBKU6 bugfix: crash in Text.up() after return
  • [14] WJBZZQE4 fold together two largely similar cases
  • [15] JY4VK7L2 rename
  • [16] FPY4LO2W make a few names consistent with snake_case
  • [17] DHI6IJCN selecting text and deleting selections
  • [18] IRCKL6VN extract scrolling logic out of insert_at_cursor
  • [19] MTJEVRJR add state arg to a few functions
  • [20] ZS5IYZH5 stop caching screen_bottom1
  • [21] 2POFQQLW keep cursor on screen when pressing 'down'
  • [22] KKMFQDR4 editing source code from within the app
  • [23] 3TDOZESE extract scrolling logic out of insert_return
  • [24] QAMVLUK2 fix a crash involving mouse and drawings
  • [25] LNUHQOGH start passing in Editor_state explicitly
  • [26] OYXDYPGS get rid of debug variables
  • [27] PX7DDEMO autosave slightly less aggressively
  • [28] FYS7TCDW bugfix
  • [29] ILOA5BYF separate data structure for each line's cache data
  • [30] QXVD2RIF add state arg to Drawing.mouse_released
  • [31] SPSW74Y5 add state arg to Text.keychord_pressed
  • [32] PTDO2SOT add state arg to schedule_save
  • [33] Z5HLXU4P add state arg to a few functions
  • [34] TGHAJBES use line cache for drawings as well
  • [35] 6D5MOJS4 allow buttons to interrupt events
  • [36] K6DTOGOQ flip return value of button handlers
  • [37] LSYLEVBD drop some redundant args when clearing the cache
  • [38] XNFTJHC4 split keyboard handling between Text and Drawing
  • [*] BULPIBEG beginnings of a module for the text editor

Change contents

  • replacement in text.lua at line 154
    [3.121][3.1:35](),[3.173][3.1:35](),[3.732][3.1:35](),[3.8394][3.1:35](),[3.57146][3.1:35](),[3.627][3.1:35]()
    --== shortcuts that mutate text
    [3.121]
    [3.627]
    --== shortcuts that mutate text (must schedule_save)
  • edit in text.lua at line 163
    [3.113]
    [3.3]
    record_undo_event(State, {before=before, after=snapshot(State, before_line, State.cursor1.line)})
  • edit in text.lua at line 165
    [3.28][3.1211:1313]()
    record_undo_event(State, {before=before, after=snapshot(State, before_line, State.cursor1.line)})
  • edit in text.lua at line 174
    [3.814][3.29:54]()
    schedule_save(State)
  • edit in text.lua at line 175
    [3.1459]
    [3.2046]
    schedule_save(State)
  • edit in text.lua at line 222
    [2.916]
    [3.83]
    record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})
  • edit in text.lua at line 224
    [3.108][3.1586:1675]()
    record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})
  • edit in text.lua at line 256
    [3.183][3.137:162](),[3.4265][3.137:162]()
    schedule_save(State)
  • edit in text.lua at line 257
    [3.1891]
    [3.209]
    schedule_save(State)
  • edit in source_text.lua at line 237
    [3.99142][3.99142:99167]()
    schedule_save(State)
  • edit in source_text.lua at line 238
    [3.99269]
    [3.99269]
    schedule_save(State)
  • edit in source_text.lua at line 248
    [3.99928][3.99928:99953]()
    schedule_save(State)
  • edit in source_text.lua at line 249
    [3.100042]
    [3.100042]
    schedule_save(State)
  • edit in source_text.lua at line 296
    [2.3234][3.102911:102936](),[3.102911][3.102911:102936]()
    schedule_save(State)
  • edit in source_text.lua at line 297
    [3.103025]
    [3.103025]
    schedule_save(State)
  • edit in source_text.lua at line 330
    [3.105341][3.105341:105366]()
    schedule_save(State)
  • edit in source_text.lua at line 331
    [3.105455]
    [3.105455]
    schedule_save(State)
  • edit in source_edit.lua at line 192
    [3.20891][3.20891:20935]()
    schedule_save(State)
  • edit in source_edit.lua at line 193
    [3.21059]
    [3.21059]
    schedule_save(State)
  • edit in source_edit.lua at line 302
    [3.2541][3.22438:22463](),[3.22438][3.22438:22463]()
    schedule_save(State)
  • edit in source_edit.lua at line 306
    [3.22639]
    [3.31204]
    schedule_save(State)
  • edit in source_edit.lua at line 494
    [3.162972]
    [3.162972]
    record_undo_event(State, {before=before, after=snapshot(State, before_line, State.cursor1.line)})
  • edit in source_edit.lua at line 496
    [3.162997][3.162997:163099]()
    record_undo_event(State, {before=before, after=snapshot(State, before_line, State.cursor1.line)})
  • edit in edit.lua at line 187
    [3.767][3.767:811]()
    schedule_save(State)
  • edit in edit.lua at line 188
    [3.935]
    [3.935]
    schedule_save(State)
  • edit in edit.lua at line 298
    [3.5557][3.420:445](),[3.68][3.420:445]()
    schedule_save(State)
  • edit in edit.lua at line 302
    [3.8797]
    [3.8797]
    schedule_save(State)
  • edit in edit.lua at line 493
    [3.14368]
    [3.552]
    record_undo_event(State, {before=before, after=snapshot(State, before_line, State.cursor1.line)})
  • edit in edit.lua at line 495
    [3.577][3.2710:2812]()
    record_undo_event(State, {before=before, after=snapshot(State, before_line, State.cursor1.line)})