]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-show.c
cli: update to use new count API
[notmuch] / notmuch-show.c
index e05480899b33e9cfbc3809f37e9e8c2b6cc8b3de..5a83c6056ca5de85ef52b5dbb64359904dbba1a4 100644 (file)
@@ -896,8 +896,13 @@ do_show_single (void *ctx,
     notmuch_messages_t *messages;
     notmuch_message_t *message;
     notmuch_status_t status;
+    unsigned int count;
 
-    if (notmuch_query_count_messages (query) != 1) {
+    status = notmuch_query_count_messages_st (query, &count);
+    if (print_status_query ("notmuch show", query, status))
+       return 1;
+
+    if (count != 1) {
        fprintf (stderr, "Error: search term did not match precisely one message.\n");
        return 1;
     }