about summary refs log tree commit diff stats
path: root/select.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-12 16:55:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-12 16:55:32 -0700
commit5b91af1a66e1a3a9b52fed67727365217425b502 (patch)
tree8dee5b71c97fd2cbcf93cc362f073a1abd722945 /select.lua
parent188bbc73cc3c0baddcf48f2501b18248b7ed3fc1 (diff)
downloadtext.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.lua4
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)