From: mailinglist@flasht.de (Christopher Bertels)
Subject: [sup-talk] Toggle expand/collapse of a message in threadview
Date: Fri, 05 Jun 2009 13:24:07 +0200 [thread overview]
Message-ID: <1244200965-sup-607@thinkpad-ubuntu> (raw)
In-Reply-To: <1244199822-sup-1224@thinkpad-ubuntu>
Ok, wasn't so hard.
Here's the patch:
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
index 2b6c58b..1e014c3 100644
--- a/lib/sup/modes/thread-view-mode.rb
+++ b/lib/sup/modes/thread-view-mode.rb
@@ -234,10 +234,12 @@ EOS
## view.
def activate_chunk
chunk = @chunk_lines[curpos] or return
+ move_to_next = false
if chunk.is_a? Chunk::Text
## if the cursor is over a text region, expand/collapse the
## entire message
chunk = @message_lines[curpos]
+ move_to_next = true
end
layout = if chunk.is_a?(Message)
@layout[chunk]
@@ -253,7 +255,7 @@ EOS
end
if chunk.is_a?(Message)
jump_to_message chunk
- jump_to_next_open
+ jump_to_next_open if move_to_next
end
end
Excerpts from Christopher Bertels's message of Fr Jun 05 13:09:34 +0200 2009:
> Actually, now that I've been using it a little more, I think it would be nicer
> that when pressing enter on a collapsed message, the cursor would stay at the
> header of that expanded message instead of moving to the next message header.
> Right now, it's always moving to the next message, even when expanding a
> collapsed
> message to read it.
>
> Excerpts from William Morgan's message of Fr Jun 05 05:38:23 +0200 2009:
> > Reformatted excerpts from Christopher Bertels's message of 2009-06-04:
> > > Is there a way to expand/collsape the current message I'm reading when
> > > in the middle of it?
> >
> > Good idea. I've changed this in git. Pressing enter on a text region now
> > collapses the message. Behavior of enter on quotes, signatures,
> > attachments, etc. is unchanged.
> >
> > Also, collapsing a message will make the cursor jump to the next open
> > message. So you should be able to scan rapidly through a thread one
> > message at a time by hitting enter to collapse it or 'n' to leave open.
> > (And then 'p' and 'n' to review all open messages.)
--
================================
Christopher Bertels
http://www.adztec-independent.de
next prev parent reply other threads:[~2009-06-05 11:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 21:28 Christopher Bertels
2009-06-05 3:38 ` William Morgan
2009-06-05 11:02 ` Christopher Bertels
2009-06-05 11:09 ` Christopher Bertels
2009-06-05 11:24 ` Christopher Bertels [this message]
2009-06-05 15:31 ` William Morgan
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=1244200965-sup-607@thinkpad-ubuntu \
--to=mailinglist@flasht.de \
/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