# HG changeset patch # User Nick Roberts # Date 1128570144 0 # Node ID 398b39fb5c3ff3f363e892fb1bef1e8f03436063 # Parent 6a0d43003c2bfb056d0ac9f28054e448a9597e06 (gdb-fringe-width): New variable. (gdb-ann3): Set it. (gdb-put-breakpoint-icon): Don't take fringe-width from speedbar frame. diff -r 6a0d43003c2b -r 398b39fb5c3f lisp/progmodes/gdb-ui.el --- a/lisp/progmodes/gdb-ui.el Thu Oct 06 03:41:32 2005 +0000 +++ b/lisp/progmodes/gdb-ui.el Thu Oct 06 03:42:24 2005 +0000 @@ -103,6 +103,7 @@ (defvar gdb-error "Non-nil when GDB is reporting an error.") (defvar gdb-macro-info nil "Non-nil if GDB knows that the inferior includes preprocessor macro info.") +(defvar gdb-fringe-width nil) (defvar gdb-buffer-type nil "One of the symbols bound in `gdb-buffer-rules'.") @@ -377,7 +378,8 @@ gdb-location-alist nil gdb-find-file-unhook nil gdb-error nil - gdb-macro-info nil) + gdb-macro-info nil + gdb-buffer-fringe-width (car (window-fringes))) ;; (setq gdb-buffer-type 'gdba) ;; @@ -2470,7 +2472,8 @@ (defun gdb-put-breakpoint-icon (enabled bptno) (let ((start (- (line-beginning-position) 1)) (end (+ (line-end-position) 1)) - (putstring (if enabled "B" "b"))) + (putstring (if enabled "B" "b")) + (source-window (get-buffer-window (current-buffer) 0))) (add-text-properties 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") putstring) @@ -2480,7 +2483,9 @@ 0 1 `(gdb-bptno ,bptno gdb-enabled nil) putstring)) (gdb-remove-breakpoint-icons start end) (if (display-images-p) - (if (>= (car (window-fringes)) 8) + (if (>= (or left-fringe-width + (if source-window (car (window-fringes source-window))) + gdb-buffer-fringe-width) 8) (gdb-put-string nil (1+ start) `(left-fringe breakpoint @@ -2490,9 +2495,9 @@ (when (< left-margin-width 2) (save-current-buffer (setq left-margin-width 2) - (if (get-buffer-window (current-buffer) 0) + (if source-window (set-window-margins - (get-buffer-window (current-buffer) 0) + source-window left-margin-width right-margin-width)))) (put-image (if enabled