From fa3d6ac72b2fd037872fd01e27bdec6588653aa6 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Beno=C3=AEt=20PIERRE?= <benoit.pierre@gmail.com>
Date: Thu, 8 Oct 2009 21:40:29 +0200
Subject: [PATCH 2/2] fix selection when time marks are disabled

Don't try to toggle an invisible time mark, which prevent selection of
some threads (like the first one whose position match the 'Today' mark).
---
 lib/sup/modes/thread-index-mode.rb |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
index 4593af2..a9d1eeb 100644
--- a/lib/sup/modes/thread-index-mode.rb
+++ b/lib/sup/modes/thread-index-mode.rb
@@ -103,12 +103,14 @@ EOS
 
   ## open up a thread view window
   def select t=nil, when_done=nil
+    if $config[:time_markers_in_index_mode]
 	marker = @time_marks.select {|m| m[3] == curpos }[0]
 	if marker 
 		marker[2] = ! marker[2] # Toggle visibility of this marker
 		regen_text
 		return
 	end
+    end
     t ||= cursor_thread or return
 
     Redwood::reporting_thread("load messages for thread-view-mode") do
-- 
1.6.3.3

