diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb
index <HASH>..<HASH> 100644
--- a/lib/sup/modes/line-cursor-mode.rb
+++ b/lib/sup/modes/line-cursor-mode.rb
@@ -55,14 +55,11 @@ protected
     buffer.mark_dirty
   end
 
-  ## override search behavior to be cursor-based
+  ## override search behavior to be cursor-based. this is a stupid
+  ## implementation and should be made better. TODO: improve.
   def search_goto_line line
-    while line > botline
-      page_down
-    end
-    while line < topline
-      page_up
-    end
+    page_down while line >= botline
+    page_up while line < topline
     set_cursor_pos line
   end
bugfix for in-buffer search: corner case for results on last line