commit ebad6f03171c65dd075504c3a1e92612aaa4a243
parent 624298c1da52ee295e7468583385eac659ef6070
Author: Tero Tilus <tero@tilus.net>
Date: Sun, 21 Feb 2010 09:35:59 +0200
Make automatic jumping to first/next open message configurable
Diffstat:
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/sup.rb b/lib/sup.rb
@@ -260,6 +260,7 @@ else
:ask_for_subject => true,
:confirm_no_attachments => true,
:confirm_top_posting => true,
+ :jump_to_open_message => true,
:discard_snippets_from_encrypted_messages => false,
:default_attachment_save_dir => "",
:sent_source => "sup://sent",
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -111,7 +111,7 @@ EOS
mode = ThreadViewMode.new t, @hidden_labels, self
BufferManager.spawn t.subj, mode
BufferManager.draw_screen
- mode.jump_to_first_open
+ mode.jump_to_first_open if $config[:jump_to_open_message]
BufferManager.draw_screen # lame TODO: make this unnecessary
## the first draw_screen is needed before topline and botline
## are set, and the second to show the cursor having moved
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
@@ -330,7 +330,7 @@ EOS
elsif chunk.viewable?
view chunk
end
- if chunk.is_a?(Message)
+ if chunk.is_a?(Message) && $config[:jump_to_open_message]
jump_to_message chunk
jump_to_next_open if layout.state == :closed
end