mu4e: parenthesize narrowing term

When narrowing search results, parenthesize the narrowing term, so terms
with AND/OR etc. don't lead to surprising results.

Fixes #846.
This commit is contained in:
djcb
2016-05-09 23:14:36 +03:00
parent 070c623286
commit 3a7429456c
2 changed files with 2 additions and 2 deletions

View File

@ -1381,7 +1381,7 @@ query (effectively, 'widen' it), with `mu4e-headers-query-prev'."
(unless mu4e~headers-last-query
(mu4e-warn "There's nothing to filter"))
(mu4e-headers-search
(format "(%s) AND %s" mu4e~headers-last-query filter)))
(format "(%s) AND (%s)" mu4e~headers-last-query filter)))
(defun mu4e-headers-change-sorting (&optional field dir)