From 451823b0e5e71de8949bb0eadc9ea52ec795754f Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 28 Oct 2017 11:37:26 +0200 Subject: [PATCH] Don't allow (minibuffer-window-active-p nil) to return t * lisp/window.el (minibuffer-window-active-p): Return t only if WINDOW is a live window. --- lisp/window.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/window.el b/lisp/window.el index 5d9409bf62c..f87294ceb15 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2583,7 +2583,7 @@ and no others." (defun minibuffer-window-active-p (window) "Return t if WINDOW is the currently active minibuffer window." - (eq window (active-minibuffer-window))) + (and (window-live-p window) (eq window (active-minibuffer-window)))) (defun count-windows (&optional minibuf) "Return the number of live windows on the selected frame. -- 2.39.2