explicitly state when operations manage undo

akkartik
Sep 1, 2024, 1:59 AM
6TBU3VTNCIYJXXZEWNPVYTDIJ4TA5U7PTC5QOT6JCZDLSEJLR44QC

Dependencies

  • [2] IFTYOERM line.y -> line_cache.starty in a few more places
  • [3] JUU6KXPC bugfix: don't clear selection on M-arrow
  • [4] TMWSQNZD bugfix in source editor: don't clear selection on M-arrow
  • [5] SPSW74Y5 add state arg to Text.keychord_pressed
  • [6] FPY4LO2W make a few names consistent with snake_case
  • [7] WK6UK5AJ enhance bugfix of commit a9aa3436f (Dec 2024)
  • [8] S2MISTTM add state arg to a few functions
  • [9] LXTTOB33 extract a couple of files
  • [10] LF7BWEG4 group all editor globals
  • [11] Z3IQ6A4R bugfix
  • [12] XNFTJHC4 split keyboard handling between Text and Drawing
  • [13] LNUHQOGH start passing in Editor_state explicitly
  • [14] PTDO2SOT add state arg to schedule_save
  • [15] MXA3RZYK deduce left/right from state where possible
  • [16] G3DLS5OU audit all asserts
  • [17] ZS5IYZH5 stop caching screen_bottom1
  • [18] OP643FFG move
  • [19] 6XCJX4DZ bugfix: inscript's bug
  • [20] BH7BT36L ctrl+a: select entire buffer
  • [21] Z3BQO2RK typo
  • [22] 5SM6DRHK port inscript's bugfix to source editor
  • [23] UHB4GARJ left/right margin -> left/right coordinates
  • [24] KKMFQDR4 editing source code from within the app
  • [25] 4CXVIEBS add args to some functions
  • [26] KMSL74GA support selections in the source editor
  • [27] MUDXM3JI clearing starty is redundant in mutations
  • [28] 2L5MEZV3 experiment: new edit namespace
  • [*] BULPIBEG beginnings of a module for the text editor

Change contents

  • replacement in text.lua at line 177
    [5.1225][5.15514:15574]()
    Text.delete_selection(State, State.left, State.right)
    [5.1225]
    [5.55]
    Text.delete_selection_and_record_undo_event(State)
  • replacement in text.lua at line 225
    [5.2976][5.15732:15792]()
    Text.delete_selection(State, State.left, State.right)
    [5.2976]
    [5.109]
    Text.delete_selection_and_record_undo_event(State)
  • replacement in source_text.lua at line 251
    [5.21274][5.21274:21334]()
    Text.delete_selection(State, State.left, State.right)
    [5.21274]
    [5.21334]
    Text.delete_selection_and_record_undo_event(State)
  • replacement in source_text.lua at line 299
    [5.21417][5.21417:21477]()
    Text.delete_selection(State, State.left, State.right)
    [5.21417]
    [5.21477]
    Text.delete_selection_and_record_undo_event(State)
  • replacement in source_select.lua at line 86
    [5.27139][5.27139:27174]()
    function Text.cut_selection(State)
    [5.27139]
    [5.27174]
    function Text.cut_selection_and_record_undo_event(State)
  • replacement in source_select.lua at line 89
    [5.27263][5.27263:27294]()
    Text.delete_selection(State)
    [5.27263]
    [5.27294]
    Text.delete_selection_and_record_undo_event(State)
  • replacement in source_select.lua at line 93
    [5.27315][5.27315:27353]()
    function Text.delete_selection(State)
    [5.27315]
    [5.27353]
    function Text.delete_selection_and_record_undo_event(State)
  • replacement in source_edit.lua at line 395
    [5.160][5.32597:32655](),[5.164][5.32597:32655](),[5.179][5.32597:32655](),[4.197][5.32597:32655](),[5.198][5.32597:32655](),[5.32597][5.32597:32655]()
    Text.delete_selection(State, State.left, State.right)
    [4.197]
    [5.32655]
    Text.delete_selection_and_record_undo_event(State)
  • replacement in source_edit.lua at line 473
    [5.162082][5.162082:162147]()
    local s = Text.cut_selection(State, State.left, State.right)
    [5.161975]
    [5.162147]
    local s = Text.cut_selection_and_record_undo_event(State)
  • replacement in select.lua at line 84
    [5.10][5.4293:4328]()
    function Text.cut_selection(State)
    [5.10]
    [5.1580]
    function Text.cut_selection_and_record_undo_event(State)
  • replacement in select.lua at line 87
    [5.1669][5.4329:4360]()
    Text.delete_selection(State)
    [5.1669]
    [5.100]
    Text.delete_selection_and_record_undo_event(State)
  • replacement in select.lua at line 91
    [5.46500][5.4361:4399]()
    function Text.delete_selection(State)
    [5.46500]
    [5.1765]
    function Text.delete_selection_and_record_undo_event(State)
  • replacement in edit.lua at line 389
    [3.185][5.22916:22974](),[5.325][5.22916:22974](),[5.363][5.22916:22974](),[5.401][5.22916:22974](),[5.500][5.22916:22974](),[5.10886][5.22916:22974]()
    Text.delete_selection(State, State.left, State.right)
    [3.185]
    [5.10956]
    Text.delete_selection_and_record_undo_event(State)
  • replacement in edit.lua at line 470
    [2.1158][5.22975:23040](),[5.8593][5.22975:23040]()
    local s = Text.cut_selection(State, State.left, State.right)
    [5.13432]
    [5.13588]
    local s = Text.cut_selection_and_record_undo_event(State)