]> git.cworth.org Git - notmuch/blobdiff - vim/notmuch.vim
Vim: Ensure that every queries respect excluded tags
[notmuch] / vim / notmuch.vim
index 541698cdfee7939e05aa3554ff39c91295920940..8e547d4e50a16202c1a2a8c99d414e6a7f898f08 100644 (file)
@@ -640,9 +640,6 @@ ruby << EOF
                        $searches.clear
                        folders.each do |name, search|
                                q = $curbuf.query(search)
-                               $exclude_tags.each { |t|
-                                       q.add_tag_exclude(t)
-                               }
                                $searches << search
                                count = count_threads ? q.count_threads : q.count_messages
                                b << "%9d %-20s (%s)" % [count, name, search]
@@ -654,9 +651,6 @@ ruby << EOF
                date_fmt = VIM::evaluate('g:notmuch_date_format')
                q = $curbuf.query(search)
                q.sort = Notmuch::SORT_NEWEST_FIRST
-               $exclude_tags.each { |t|
-                       q.add_tag_exclude(t)
-               }
                $threads.clear
                t = q.search_threads
 
@@ -708,6 +702,9 @@ ruby << EOF
                def query(*args)
                        q = @db.query(*args)
                        @queries << q
+                       $exclude_tags.each { |t|
+                           q.add_tag_exclude(t)
+                       }
                        q
                end