commit c88a472f1888fc7a638fe83b53a8a2900d3f76dd
parent d56b50fb45c5e3b84eb35f96c168adcf9dc77e16
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Mon, 9 Jul 2007 23:25:12 +0000
bugfix: tab (next new) doesn't scroll screen
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@493 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -201,9 +201,10 @@ class ThreadIndexMode < LineCursorMode
end
def jump_to_next_new
- n = ((curpos + 1) ... lines).find { |i| @threads[i].has_label? :unread }
- n = (0 ... curpos).find { |i| @threads[i].has_label? :unread } unless n
+ n = ((curpos + 1) ... lines).find { |i| @threads[i].has_label? :unread } || (0 ... curpos).find { |i| @threads[i].has_label? :unread }
if n
+ ## jump there if necessary
+ jump_to_line n unless n >= topline && n < botline
set_cursor_pos n
else
BufferManager.flash "No new messages"