* [sup-talk] Toggle expand/collapse of a message in threadview
@ 2009-06-04 21:28 Christopher Bertels
2009-06-05 3:38 ` William Morgan
0 siblings, 1 reply; 6+ messages in thread
From: Christopher Bertels @ 2009-06-04 21:28 UTC (permalink / raw)
Hi!
I've been wondering:
Is there a way to expand/collsape the current message I'm reading when in the
middle of it?
I know I can press ENTER to toggle it when I'm hovering the message's header,
but is it possible when I'm in the middle of a message?
When reading long threads with long messages, this would really be handy, as
for now I always have to go up or toggle all messages and
work my way through a thread like that.
It would be nice if I could simply press a key to toggle the current message
I'm looking at (where the current highlighted line belongs to).
Maybe I'm blind and simply haven't found this feature? Can't find it in the
help menu.
Thanks,
Christopher.
--
================================
Christopher Bertels
http://www.adztec-independent.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] Toggle expand/collapse of a message in threadview
2009-06-04 21:28 [sup-talk] Toggle expand/collapse of a message in threadview Christopher Bertels
@ 2009-06-05 3:38 ` William Morgan
2009-06-05 11:02 ` Christopher Bertels
2009-06-05 11:09 ` Christopher Bertels
0 siblings, 2 replies; 6+ messages in thread
From: William Morgan @ 2009-06-05 3:38 UTC (permalink / raw)
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.)
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] Toggle expand/collapse of a message in threadview
2009-06-05 3:38 ` William Morgan
@ 2009-06-05 11:02 ` Christopher Bertels
2009-06-05 11:09 ` Christopher Bertels
1 sibling, 0 replies; 6+ messages in thread
From: Christopher Bertels @ 2009-06-05 11:02 UTC (permalink / raw)
Oh cool!
Thanks, works great and exactly what I wanted! :)
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] Toggle expand/collapse of a message in threadview
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
1 sibling, 1 reply; 6+ messages in thread
From: Christopher Bertels @ 2009-06-05 11:09 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [sup-talk] Toggle expand/collapse of a message in threadview
2009-06-05 11:09 ` Christopher Bertels
@ 2009-06-05 11:24 ` Christopher Bertels
2009-06-05 15:31 ` William Morgan
0 siblings, 1 reply; 6+ messages in thread
From: Christopher Bertels @ 2009-06-05 11:24 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-05 15:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-04 21:28 [sup-talk] Toggle expand/collapse of a message in threadview 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
2009-06-05 15:31 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox