From: Nick Roberts Date: Sat, 5 Jul 2008 09:35:01 +0000 (+0000) Subject: (gdb-display-buffer): Don't split a buffer X-Git-Tag: emacs-pretest-23.0.90~4323 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=95741663a9ee4bdedd5aff161b8b73ea152ba4f7;p=emacs.git (gdb-display-buffer): Don't split a buffer if it's not part of gdb-ui, e.g, at start. --- diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 7f49679641c..1b9ed9ad7e0 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -3084,12 +3084,16 @@ another GDB command e.g pwd, to see new frames") (if answer (display-buffer buf nil (or frame 0)) ;Deiconify the frame if necessary. (let ((window (get-lru-window))) - (let* ((largest (get-largest-window)) - (cur-size (window-height largest))) - (setq answer (split-window largest)) - (set-window-buffer answer buf) - (set-window-dedicated-p answer dedicated))) - answer))) + (if (memq (buffer-local-value 'gud-minor-mode (window-buffer window)) + '(gdba gdbmi)) + (let* ((largest (get-largest-window)) + (cur-size (window-height largest))) + (setq answer (split-window largest)) + (set-window-buffer answer buf) + (set-window-dedicated-p answer dedicated) + answer) + (set-window-buffer window buf) + window))))) ;;; Shared keymap initialization: