From a80fb34c6d34b406136033ac184d35125f18a6e8 Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 11 Aug 2012 11:55:34 +0300 Subject: [PATCH] * mu4e: don't try to kill the headers window if it's the last one --- mu4e/mu4e-headers.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index 05394d7e..fbb90df3 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -1218,10 +1218,11 @@ to ensure we don't disturb other windows." (headers-visible)) (walk-windows (lambda (win) - ;; if we the view window connected to this one, kill it - (when (eq mu4e~headers-view-win win) - (delete-window win) - (setq mu4e~headers-view-win nil)) + (with-selected-window win + ;; if we the view window connected to this one, kill it + (when (and (not (one-window-p win)) (eq mu4e~headers-view-win win)) + (delete-window win) + (setq mu4e~headers-view-win nil))) ;; and kill any _other_ (non-selected) window that shows the current ;; buffer (when (and