]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-config.c
config: only exclude messages if 'search.exclude_tags' is explicitly set
[notmuch] / notmuch-config.c
index 39da8889edb41b6c11a2f3af49a5edd46fbc7350..0ded6d739962d26d6c9ba61bbea4f9cc583b5d7b 100644 (file)
@@ -362,8 +362,12 @@ notmuch_config_open (void *ctx,
     }
 
     if (notmuch_config_get_search_exclude_tags (config, &tmp) == NULL) {
-       const char *tags[] = { "deleted", "spam" };
-       notmuch_config_set_search_exclude_tags (config, tags, 2);
+       if (is_new) {
+           const char *tags[] = { "deleted", "spam" };
+           notmuch_config_set_search_exclude_tags (config, tags, 2);
+       } else {
+           notmuch_config_set_search_exclude_tags (config, NULL, 0);
+       }
     }
 
     error = NULL;