sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 87a8300bf03d82e4739c9acabf8862c4c0c1c822
parent 0b356874a1e3b071eef94a42a0d160b4078f4cb7
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Sun, 21 Jan 2007 17:42:16 +0000

minor bugfix


git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@269 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M lib/sup/modes/thread-view-mode.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
@@ -237,7 +237,7 @@ class ThreadViewMode < LineCursorMode
   def expand_all_quotes
     if(m = @message_lines[curpos])
       quotes = m.chunks.select { |c| (c.is_a?(Message::Quote) || c.is_a?(Message::Signature)) && c.lines.length > 1 }
-      numopen = quotes.inject(0) { |s, c| s + (@layout[c].state == :open ? 1 : 0) }
+      numopen = quotes.inject(0) { |s, c| s + (@layout[c].state && @layout[c].state == :open ? 1 : 0) }
       newstate = numopen > quotes.length / 2 ? :closed : :open
       quotes.each { |c| @layout[c].state = newstate }
       update