]> git.notmuchmail.org Git - notmuch/blobdiff - lib/query.cc
Use $(MAKE) when invoking make from make.
[notmuch] / lib / query.cc
index 4b4c80f4d5f952d3340ce495c1c2583b984d76ca..b5f1546ac084d609b24a25a60dd68e677f513145 100644 (file)
@@ -231,12 +231,12 @@ notmuch_query_search_threads (notmuch_query_t *query,
                threads_seen++;
            }
 
-           if (thread)
-               _notmuch_thread_add_message (thread, message);
-
            notmuch_message_destroy (message);
 
            messages_seen++;
+
+           if (max_threads >= 0 && threads_seen >= first + max_threads)
+               break;
        }
 
        /* Stop if we're not seeing any more messages. */