]> git.cworth.org Git - sup/commitdiff
bugfix for edit labels on nil thread (thanks to ryan king)
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 19 Feb 2007 22:43:57 +0000 (22:43 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 19 Feb 2007 22:43:57 +0000 (22:43 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@332 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/modes/thread-index-mode.rb

index d67a076724a1c49f73909c6c5803d99f4b9cd0f9..e276ccc939b8bfb2855bb00dd690cc6d13b6f9c4 100644 (file)
@@ -275,7 +275,7 @@ class ThreadIndexMode < LineCursorMode
   def apply_to_tagged; @tags.apply_to_tagged; end
 
   def edit_labels
-    thread = @threads[curpos]
+    thread = @threads[curpos] or return
     speciall = (@hidden_labels + LabelManager::RESERVED_LABELS).uniq
     keepl, modifyl = thread.labels.partition { |t| speciall.member? t }
     label_string = modifyl.join(" ")