sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit ebe9b78bee0652471af45bdeab70e51ff2e707fa
parent 96fbffda42682308637207eee9048a39e2185642
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Thu, 27 Dec 2007 14:07:03 -0800

bugfix for in-buffer search: corner case for results on last line

Diffstat:
M lib/sup/modes/line-cursor-mode.rb | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git 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