]> git.eshelyaron.com Git - emacs.git/commitdiff
(gdb-display-buffer): Don't split a buffer
authorNick Roberts <nickrob@snap.net.nz>
Sat, 5 Jul 2008 09:35:01 +0000 (09:35 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Sat, 5 Jul 2008 09:35:01 +0000 (09:35 +0000)
if it's not part of gdb-ui, e.g, at start.

lisp/progmodes/gdb-ui.el

index 7f49679641c4d3db50913432c39bb26ac782a8fd..1b9ed9ad7e038ab9715221a8d1ec829da50507f0 100644 (file)
@@ -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)))))
 
 \f
 ;;; Shared keymap initialization: