diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2024-08-31 18:59:23 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2024-08-31 18:59:23 -0700 |
commit | f98cdd14fd876f57a8dc753316fc27994242828f (patch) | |
tree | 5cf7dd0e0d7c7c87f2893eabe493d4e63530c1c8 /source_select.lua | |
parent | 5c8e3e96c8b852394cd2b0956d6e9bb0b6cc543d (diff) | |
download | lines.love-f98cdd14fd876f57a8dc753316fc27994242828f.tar.gz |
explicitly state when operations manage undo
Diffstat (limited to 'source_select.lua')
-rw-r--r-- | source_select.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source_select.lua b/source_select.lua index b67dd16..a223b80 100644 --- a/source_select.lua +++ b/source_select.lua @@ -83,14 +83,14 @@ function Text.mouse_pos(State) return screen_bottom1.line, Text.pos_at_end_of_screen_line(State, screen_bottom1) end -function Text.cut_selection(State) +function Text.cut_selection_and_record_undo_event(State) if State.selection1.line == nil then return end local result = Text.selection(State) - Text.delete_selection(State) + Text.delete_selection_and_record_undo_event(State) return result end -function Text.delete_selection(State) +function Text.delete_selection_and_record_undo_event(State) if State.selection1.line == nil then return end local minl,maxl = minmax(State.selection1.line, State.cursor1.line) local before = snapshot(State, minl, maxl) |