]> granicus.if.org Git - neomutt/commitdiff
mutt_nm_db_limit option defines a default limit
authorChristoph Rissner <cri@visotech.at>
Sun, 16 Sep 2012 07:31:54 +0000 (09:31 +0200)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 15:30:06 +0000 (16:30 +0100)
globals.h
init.h
mutt_notmuch.c

index 95d9f122904bdebf1dd241497b747004a229772b..bf27e1c9b8ca293405b157772bcbe661a7d6c175 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -287,6 +287,7 @@ WHERE char *NotmuchDefaultUri;
 WHERE char *NotmuchUnreadTag;
 WHERE char *NotmuchHiddenTags;
 WHERE char *VirtFolderFormat;
+WHERE int NotmuchDBLimit;
 #endif
 
 
diff --git a/init.h b/init.h
index 50f93a846a163ed305fd0298d0f843f89efbb471..6f3b346ca2ad00bdb1dcca9d03d5085bdc999fb6 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1696,6 +1696,11 @@ struct option_t MuttVars[] = {
    ** variable is used to count unread messages in DB only. All other mutt commands
    ** use standard (e.g. maildir) flags.
    */
+  { "nm_db_limit", DT_NUM, R_NONE, UL &NotmuchDBLimit, 0 },
+  /*
+   ** .pp
+   ** This variable specifies the default limit used in notmuch queries.
+   */
 #endif
   { "pager",           DT_PATH, R_NONE, UL &Pager, UL "builtin" },
   /*
index cb1891dd83a47609d39419e0364ab5d2121643cc..28ad8b4705ad326b3738260447c525e304185d5e 100644 (file)
@@ -211,6 +211,8 @@ static struct nm_ctxdata *new_ctxdata(char *uri)
        data = safe_calloc(1, sizeof(struct nm_ctxdata));
        dprint(1, (debugfile, "nm: initialize context data %p\n", data));
 
+       data->db_limit = NotmuchDBLimit;
+
        if (url_parse_query(uri, &data->db_filename, &data->query_items)) {
                mutt_error(_("failed to parse notmuch uri: %s"), uri);
                data->db_filename = NULL;