From: Christoph Rissner Date: Sun, 16 Sep 2012 07:31:54 +0000 (+0200) Subject: mutt_nm_db_limit option defines a default limit X-Git-Tag: neomutt-20160404~13^2~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=764f6758879b44df248c11f4b47d5ad15e947a7e;p=neomutt mutt_nm_db_limit option defines a default limit --- diff --git a/globals.h b/globals.h index 95d9f1229..bf27e1c9b 100644 --- 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 50f93a846..6f3b346ca 100644 --- 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" }, /* diff --git a/mutt_notmuch.c b/mutt_notmuch.c index cb1891dd8..28ad8b470 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -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;