]> granicus.if.org Git - neomutt/commit
notmuch: virtual-mailboxes should accept a limit
authorAustin Ray <austin.duke.ray@gmail.com>
Tue, 17 Oct 2017 21:23:36 +0000 (17:23 -0400)
committerRichard Russon <rich@flatcap.org>
Tue, 17 Oct 2017 21:23:36 +0000 (22:23 +0100)
commitb8fb9113b3f22f7bb200d497d0495de9bfdb338a
treea92e97d899c4f3a6669ebb0b812ef400c9430682
parentd008662ae2064d13ec87409fd779ce77e4e1c758
notmuch: virtual-mailboxes should accept a limit

* Fix issue #849

nm_uri_from_query() checks if there is a custom limit and includes it
in the URI. This keeps the limit intact after nm_normalize_uri()
terminates. Otherwise, the limit is stored within nm_normalize_uri()'s
temporary NmCtxData struct and lost upon termination.

Additionally, nm_normalize_uri() properly initializes tmp_ctxdata, which
sets the default db_limit value. This ensures db_limit is either
NmDbLimit or the custom limit. My earlier attempt to resolve #849 did
not initialize db_limit and suffered from random db_limit values.

The url_parse_query() check was removed from nm_normalize_uri() as
new_ctxdata() contains the same block of code. Error message numbering
has been updated the reflect the change.

* Remove redundant variable

Refactor per suggestions in code review to remove redundant variable and
update method signature.

The removal of the redundant variable prompt the need to change
tmp_ctxdata from NmCtxData to *NmCtxData. Calls to its fields have been
updated to reflect its new status.

* wipe the context before use
mutt_notmuch.c