summaryrefslogtreecommitdiff
path: root/state.lua
diff options
context:
space:
mode:
Diffstat (limited to 'state.lua')
-rw-r--r--state.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/state.lua b/state.lua
index 3abb892..b5e07f5 100644
--- a/state.lua
+++ b/state.lua
@@ -201,8 +201,9 @@ function menu_mt:set_search_cursor(pos)
return true
end
-function menu_mt:set_search_text(str)
+function menu_mt:set_search_text(str, pos)
self.search_text = str
+ self:set_search_cursor(pos or self.search_cursor)
self:update_search_matches()
end