Merge pull request #1099 from stsquad/fix-header-history

mu4e: don't loose search history when editing search
This commit is contained in:
Dirk-Jan C. Binnema
2017-06-17 12:05:51 +03:00
committed by GitHub

View File

@ -1387,11 +1387,10 @@ searching. If SHOW is non-nil, show the message with MSGID."
;; `mu4e~headers-query-next' or `mu4e~headers-query-prev'." ;; `mu4e~headers-query-next' or `mu4e~headers-query-prev'."
(interactive) (interactive)
(let* ((prompt (mu4e-format (or prompt "Search for: "))) (let* ((prompt (mu4e-format (or prompt "Search for: ")))
(expr (expr
(if edit (read-string prompt
(read-string prompt expr) (if edit expr nil)
(or expr 'mu4e~headers-search-hist)))
(read-string prompt nil 'mu4e~headers-search-hist)))))
(mu4e-mark-handle-when-leaving) (mu4e-mark-handle-when-leaving)
(mu4e~headers-search-execute expr ignore-history) (mu4e~headers-search-execute expr ignore-history)
(setq mu4e~headers-msgid-target msgid (setq mu4e~headers-msgid-target msgid