Merge pull request #602 from tiagosab/master
mu4e: avoid error when splitting headers window
This commit is contained in:
@ -985,13 +985,16 @@ of `mu4e-split-view', and return a window for the message view."
|
|||||||
(kill-buffer mu4e~view-buffer))
|
(kill-buffer mu4e~view-buffer))
|
||||||
;; get a new view window
|
;; get a new view window
|
||||||
(setq mu4e~headers-view-win
|
(setq mu4e~headers-view-win
|
||||||
|
(let* ((new-win-func
|
||||||
(cond
|
(cond
|
||||||
((eq mu4e-split-view 'horizontal) ;; split horizontally
|
((eq mu4e-split-view 'horizontal) ;; split horizontally
|
||||||
(split-window-vertically mu4e-headers-visible-lines))
|
'(split-window-vertically mu4e-headers-visible-lines))
|
||||||
((eq mu4e-split-view 'vertical) ;; split vertically
|
((eq mu4e-split-view 'vertical) ;; split vertically
|
||||||
(split-window-horizontally mu4e-headers-visible-columns))
|
'(split-window-horizontally mu4e-headers-visible-columns)))))
|
||||||
|
(cond ((with-demoted-errors "Unable to split window"
|
||||||
|
(eval new-win-func)))
|
||||||
(t ;; no splitting; just use the currently selected one
|
(t ;; no splitting; just use the currently selected one
|
||||||
(selected-window))))
|
(selected-window)))))
|
||||||
mu4e~headers-view-win)
|
mu4e~headers-view-win)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
Reference in New Issue
Block a user