diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-07-12 16:55:32 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-07-12 16:55:32 -0700 |
commit | 5b91af1a66e1a3a9b52fed67727365217425b502 (patch) | |
tree | 8dee5b71c97fd2cbcf93cc362f073a1abd722945 /select.lua | |
parent | 188bbc73cc3c0baddcf48f2501b18248b7ed3fc1 (diff) | |
download | text.love-5b91af1a66e1a3a9b52fed67727365217425b502.tar.gz |
add state arg to a few functions
- record_undo_event - undo_event - redo_event - snapshot
Diffstat (limited to 'select.lua')
-rw-r--r-- | select.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/select.lua b/select.lua index dfa7f45..1b74858 100644 --- a/select.lua +++ b/select.lua @@ -110,9 +110,9 @@ end function Text.delete_selection(State, left, right) if State.selection1.line == nil then return end local minl,maxl = minmax(State.selection1.line, State.cursor1.line) - local before = snapshot(minl, maxl) + local before = snapshot(State, minl, maxl) Text.delete_selection_without_undo(State, left, right) - record_undo_event({before=before, after=snapshot(State.cursor1.line)}) + record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)}) end function Text.delete_selection_without_undo(State, left, right) |