Merge pull request #2378 from mickeynp/bugfix/fix-window-issues

Bugfix/fix window and buffer issues
This commit is contained in:
Dirk-Jan C. Binnema 2022-12-16 18:56:19 +02:00 committed by GitHub
commit 371376a42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -673,8 +673,11 @@ appropriate flag at the message forwarded or replied-to."
"Wrapper around `message-kill-buffer'.
It restores mu4e window layout after killing the compose-buffer."
(interactive)
(let ((current-buffer (current-buffer)))
(let ((current-buffer (current-buffer))
(win (selected-window)))
(message-kill-buffer)
(when (window-live-p win)
(delete-window win))
;; Compose buffer killed
(when (not (equal current-buffer (current-buffer)))
;; Restore mu4e

View File

@ -214,7 +214,7 @@ being created if CREATE is non-nil."
;; we'll generate a new, unique name.
(when (and (buffer-live-p buffer) (mu4e--view-detached-p buffer))
(setq buffer (generate-new-buffer-name buffer-name)))
(when (or (not (buffer-live-p buffer)) create)
(when (and (not (buffer-live-p buffer)) create)
(setq buffer (get-buffer-create (or buffer buffer-name)))
(with-current-buffer buffer
(mu4e-view-mode))))