about summary refs log tree commit diff stats
path: root/search.lua
diff options
context:
space:
mode:
Diffstat (limited to 'search.lua')
-rw-r--r--search.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/search.lua b/search.lua
index 499eb2b..2e86688 100644
--- a/search.lua
+++ b/search.lua
@@ -56,7 +56,7 @@ function Text.search_next(State)
   end
   if Text.lt1(State.cursor1, State.screen_top1) or Text.lt1(State.screen_bottom1, State.cursor1) then
     State.screen_top1.line = State.cursor1.line
-    local _, pos = Text.pos_at_start_of_cursor_screen_line(State, State.margin_left, App.screen.width-State.margin_right)
+    local _, pos = Text.pos_at_start_of_cursor_screen_line(State, State.left, State.right)
     State.screen_top1.pos = pos
   end
 end
@@ -96,7 +96,7 @@ function Text.search_previous(State)
   end
   if Text.lt1(State.cursor1, State.screen_top1) or Text.lt1(State.screen_bottom1, State.cursor1) then
     State.screen_top1.line = State.cursor1.line
-    local _, pos = Text.pos_at_start_of_cursor_screen_line(State, State.margin_left, App.screen.width-State.margin_right)
+    local _, pos = Text.pos_at_start_of_cursor_screen_line(State, State.left, State.right)
     State.screen_top1.pos = pos
   end
 end