sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit d1aa68cd75b38f459332f518ce9fdf5000e3a38e
parent c72afce21deb1c3c46000cf166df7d5149d60650
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Mon, 10 Dec 2007 02:58:30 +0000

make tag-matching-threads better

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

Diffstat:
M lib/sup/modes/thread-index-mode.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -359,7 +359,7 @@ EOS
     query = BufferManager.ask :search, "tag threads matching: "
     return if query.nil? || query.empty?
     query = /#{query}/i
-    @mutex.synchronize { @threads.each { |t| @tags.tag t if thread_match?(t, query) } }
+    @mutex.synchronize { @threads.each { |t| @tags.tag t if thread_matches?(t, query) } }
     regen_text
   end
 
@@ -496,8 +496,8 @@ protected
 
   ## used to tag threads by query. this can be made a lot more sophisticated,
   ## but for right now we'll do the obvious this.
-  def thread_match? t, query
-    t.snippet =~ query || t.participants.any? { |x| x.longname =~ query }
+  def thread_matches? t, query
+    t.subject =~ query || t.snippet =~ query || t.participants.any? { |x| x.longname =~ query }
   end
 
   def size_widget_for_thread t