sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 0c2bb3cafa684528e81ef72893163672ab924d1d
parent 74370f70d6f1a639ec203052877062e7006229df
Author: Gaute Hope <eg@gaute.vetsj.com>
Date:   Sun, 23 Mar 2014 19:48:19 +0100

continuos_scroll: swap ifing order

Diffstat:
M lib/sup/modes/line_cursor_mode.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/sup/modes/line_cursor_mode.rb b/lib/sup/modes/line_cursor_mode.rb
@@ -94,7 +94,7 @@ protected
     call_load_more_callbacks buffer.content_height if @curpos >= lines - [buffer.content_height/2,1].max
     return false unless @curpos < lines - 1
 
-    if @curpos == botline - 3 and @curpos < lines - 3 and $config[:continuous_scroll]
+    if $config[:continuous_scroll] and (@curpos == botline - 3 and @curpos < lines - 3)
       # load more lines, one at a time.
       jump_to_line topline + 1
       @curpos += 1
@@ -122,7 +122,7 @@ protected
   def cursor_up
     return false unless @curpos > @cursor_top
 
-    if @curpos == topline + 2 and $config[:continuous_scroll]
+    if $config[:continuous_scroll] and (@curpos == topline + 2)
       jump_to_line topline - 1
       @curpos -= 1
       unless buffer.dirty?