Fix window restoration when C-g'ing on reply.

* mu4e/mu4e-compose.el (mu4e~compose-handler):
Save and restore window config.
This commit is contained in:
Thierry Volpiatto 2016-06-09 07:22:56 +02:00
parent d3b20704dc
commit fa2427e6f9
1 changed files with 6 additions and 4 deletions

View File

@ -484,10 +484,12 @@ tempfile)."
(run-hooks 'mu4e-compose-pre-hook)
;; this opens (or re-opens) a messages with all the basic headers set.
(condition-case nil
(mu4e-draft-open compose-type original-msg)
(quit (kill-buffer) (mu4e-message "Operation aborted")
(return-from mu4e~compose-handler)))
(let ((winconf (current-window-configuration)))
(condition-case nil
(mu4e-draft-open compose-type original-msg)
(quit (set-window-configuration winconf)
(mu4e-message "Operation aborted")
(return-from mu4e~compose-handler))))
;; insert mail-header-separator, which is needed by message mode to separate
;; headers and body. will be removed before saving to disk
(mu4e~draft-insert-mail-header-separator)