]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't allow (minibuffer-window-active-p nil) to return t
authorMartin Rudalics <rudalics@gmx.at>
Sat, 28 Oct 2017 09:37:26 +0000 (11:37 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 28 Oct 2017 09:37:26 +0000 (11:37 +0200)
* lisp/window.el (minibuffer-window-active-p): Return t
only if WINDOW is a live window.

lisp/window.el

index 5d9409bf62c266a8dfb9b21ed6b398aaebbf9201..f87294ceb151b83619d568fe10f5653a193059f8 100644 (file)
@@ -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.