summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/buff-menu.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 3c55bdb4d3c..a2f67bf59f3 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -346,7 +346,10 @@ You can mark buffers with the \\<Buffer-menu-mode-map>\\[Buffer-menu-mark] comma
(goto-char (posn-point (event-end event)))
(setq buffer (Buffer-menu-buffer t))))
(select-window (posn-window (event-end event)))
- (switch-to-buffer buffer)))
+ (if (and (window-dedicated-p (selected-window))
+ (eq (selected-window) (frame-root-window)))
+ (switch-to-buffer-other-frame buffer)
+ (switch-to-buffer buffer))))
(defun Buffer-menu-this-window ()
"Select this line's buffer in this window."