sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 0263bb808e03c8136d1f5e29434e7c068b84d179
parent e3e6a5dd15d26a419442970baef647a348d24e48
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Sat, 12 Jan 2008 21:48:36 -0800

make 'n' and 'p' in thread-view-mode always top-and-left justify

Previously, 'n' and 'p' would only move the cursor if the next or
previous message already completely fit on the screen. Now they always
move the buffer so that the current message is at the top left. I think
this makes it a little easier to read a whole thread, message by
message.

Diffstat:
M lib/sup/modes/thread-view-mode.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
@@ -317,11 +317,11 @@ EOS
     left = l.depth * INDENT_SPACES
     right = left + l.width
 
-    ## jump to the top line unless both top and bottom fit in the current view
-    jump_to_line l.top unless l.top >= topline && l.top <= botline && l.bot >= topline && l.bot <= botline
+    ## jump to the top line
+    jump_to_line l.top
 
-    ## jump to the left columns unless both left and right fit in the current view
-    jump_to_col left unless left >= leftcol && left <= rightcol && right >= leftcol && right <= rightcol
+    ## jump to the left column
+    jump_to_col left
 
     ## either way, move the cursor to the first line
     set_cursor_pos l.top