mu4e-main: restore mail-menu support for split-window mode

This commit is contained in:
Dirk-Jan C. Binnema 2022-12-29 00:23:32 +02:00
parent 15fadee730
commit eb8160e8ed
1 changed files with 14 additions and 10 deletions

View File

@ -371,17 +371,21 @@ When REFRESH is non nil refresh infos from server."
(error 0)))
(defun mu4e--main-view (&optional refresh)
"Create the mu4e main-view, and switch to it.
"Create the mu4e main-view, and switch to it or show the menu.
When REFRESH is non nil refresh infos from server.
When REFRESH is non nil refresh infos from server."
(let ((buf (get-buffer-create mu4e-main-buffer-name)))
;; `mu4e--main-view' is called from `mu4e--start', so don't call it
;; a second time here i.e. do not refresh unless specified
;; explicitly with REFRESH arg.
(with-current-buffer buf
(mu4e--main-view-real-1 refresh))
(mu4e-display-buffer buf t)
(goto-char (point-min))))
If `mu4e-split-view' equals 'single-window, show a mu4e menu
instead."
(if (eq mu4e-split-view 'single-window)
(mu4e--main-menu)
(let ((buf (get-buffer-create mu4e-main-buffer-name)))
;; `mu4e--main-view' is called from `mu4e--start', so don't call it
;; a second time here i.e. do not refresh unless specified
;; explicitly with REFRESH arg.
(with-current-buffer buf
(mu4e--main-view-real-1 refresh))
(mu4e-display-buffer buf t)
(goto-char (point-min)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Interactive functions