From 95741663a9ee4bdedd5aff161b8b73ea152ba4f7 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 5 Jul 2008 09:35:01 +0000 Subject: [PATCH] (gdb-display-buffer): Don't split a buffer if it's not part of gdb-ui, e.g, at start. --- lisp/progmodes/gdb-ui.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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: -- 2.39.2