Vim: Respect excluded tags when showing a thread

Other queries have exclude_tags taken into account but this one.
This is annoying when using an excluded tag to ignore past messages from a
thread (for example the 'deleted' tag), the entire thread is shown all the
time.
This commit is contained in:
Jules Aguillon 2021-02-17 00:43:15 +01:00 committed by David Bremner
parent 8af4cd160a
commit c3c74621fa
2 changed files with 11 additions and 0 deletions

8
NEWS
View file

@ -1,3 +1,11 @@
Notmuch 0.33 (UNRELEASED)
=========================
Vim
---
Respect excluded tags when showing a thread.
Notmuch 0.32 (UNRELEASED) Notmuch 0.32 (UNRELEASED)
========================= =========================

View file

@ -317,6 +317,9 @@ ruby << EOF
$curbuf.render do |b| $curbuf.render do |b|
q = $curbuf.query(get_cur_view) q = $curbuf.query(get_cur_view)
q.sort = Notmuch::SORT_OLDEST_FIRST q.sort = Notmuch::SORT_OLDEST_FIRST
$exclude_tags.each { |t|
q.add_tag_exclude(t)
}
msgs = q.search_messages msgs = q.search_messages
msgs.each do |msg| msgs.each do |msg|
m = Mail.read(msg.filename) m = Mail.read(msg.filename)