Commit 4a840d8b authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(imenu-choose-buffer-index): Avoid trying to select WINDOW if it is nil.

parent 8d8a3494
......@@ -966,7 +966,7 @@ The returned value is on the form (INDEX-NAME . INDEX-POSITION)."
(and mouse-triggered
(not (equal last-nonmenu-event '(menu-bar)))
(let ((window (posn-window (event-start last-nonmenu-event))))
(or (framep window) (select-window window))))
(or (framep window) (null window) (select-window window))))
;; Create a list for this buffer only when needed.
(while (eq result t)
(setq index-alist (if alist alist (imenu--make-index-alist)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment