From: Tero Tilus <tero@tilus.net>
To: Sup developers <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] Make automatic jumping to first/next open message configurable
Date: Sun, 21 Feb 2010 11:09:39 +0200 [thread overview]
Message-ID: <1266742955-sup-7923@tilus.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 532 bytes --]
Automatic jumping to first/next open message when opening/collapsing
messages on thread view more got annoying. I made it configurable.
Patch attached and feature branch also available on github.
http://github.com/terotil/sup/tree/feature-configurable-auto-jump-to-msg
I first had the configuration key other way round so missing it from
conf file would not have changed sup behavior, but it looked pretty
convoluted that way so I just dropped "backwards compatibility".
--
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
[-- Attachment #2: 0001-Make-automatic-jumping-to-first-next-open-message-co.patch --]
[-- Type: application/octet-stream, Size: 1931 bytes --]
From 230e8befb34bac38055599728923bc2999bc5e94 Mon Sep 17 00:00:00 2001
From: Tero Tilus <tero@tilus.net>
Date: Sun, 21 Feb 2010 09:35:59 +0200
Subject: [PATCH] Make automatic jumping to first/next open message configurable
---
lib/sup.rb | 1 +
lib/sup/modes/thread-index-mode.rb | 2 +-
lib/sup/modes/thread-view-mode.rb | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/sup.rb b/lib/sup.rb
index b9dc749..5114715 100644
--- 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
index a6bb2b9..7be5a1b 100644
--- 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
index 0e935a4..001a55b 100644
--- 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
--
1.5.6.5
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next reply other threads:[~2010-02-21 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-21 9:09 Tero Tilus [this message]
2010-02-27 8:29 ` Rich Lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1266742955-sup-7923@tilus.net \
--to=tero@tilus.net \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox