about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-12 17:02:53 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-12 17:02:53 -0700
commit5aae52775963f098815b31de48467f3de501190b (patch)
tree278cdff61d4d94ab89129767fa60e373a7d6d469 /edit.lua
parent5b91af1a66e1a3a9b52fed67727365217425b502 (diff)
downloadtext.love-5aae52775963f098815b31de48467f3de501190b.tar.gz
add state arg to a few functions
  - Text.search_next
  - Text.search_previous
Diffstat (limited to 'edit.lua')
-rw-r--r--edit.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/edit.lua b/edit.lua
index f5ea9bd..a0ac010 100644
--- a/edit.lua
+++ b/edit.lua
@@ -279,7 +279,7 @@ function edit.textinput(State, t)
   if State.search_term then
     State.search_term = State.search_term..t
     State.search_text = nil
-    Text.search_next()
+    Text.search_next(State)
   elseif State.current_drawing_mode == 'name' then
     local before = snapshot(State, State.lines.current_drawing_index)
     local drawing = State.lines.current_drawing
@@ -320,9 +320,9 @@ function edit.keychord_pressed(State, chord, key)
       State.search_text = nil
     elseif chord == 'down' then
       State.cursor1.pos = State.cursor1.pos+1
-      Text.search_next()
+      Text.search_next(State)
     elseif chord == 'up' then
-      Text.search_previous()
+      Text.search_previous(State)
     end
     return
   elseif chord == 'C-f' then