GNU bug report logs -
#73687
31.0.50; Stop highlighting current line when debugee is not stopped
Previous Next
Reported by: Diancheng Wang <diancheng_wang <at> 163.com>
Date: Tue, 8 Oct 2024 03:13:02 UTC
Severity: normal
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73687 in the body.
You can then email your comments to 73687 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73687
; Package
emacs
.
(Tue, 08 Oct 2024 03:13:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Diancheng Wang <diancheng_wang <at> 163.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 08 Oct 2024 03:13:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
When highlighting current line is enabled with
gud-highlight-current-line-overlay, the highlighting current line is always
enabled even debugee is running. Attachment is a patch to fix it. The patch
introduces a new function 'gud-hide-current-line-indicator', then call it
when debugee is running in gdb.el.
[gud-hide-current-line-indicator.patch (text/x-diff, inline)]
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 2981965ee0c..6a9735fbc25 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2699,7 +2699,8 @@ gdb-starting
(gdb-force-mode-line-update
(propertize gdb-inferior-status 'face font-lock-type-face))
(setq gdb-active-process t)
- (setq gud-running t))
+ (setq gud-running t)
+ (gud-hide-current-line-indicator nil))
;; -break-insert -t didn't give a reason before gdb 6.9
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 53a7d78328c..a4e611277e4 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2949,11 +2949,19 @@ gud-highlight-current-line-overlay
"Overlay created for `gud-highlight-current-line'.
It is nil if not yet present.")
+(defun gud-hide-current-line-indicator(destroy-overlay)
+ "Stop displaying arrow and highlighting current line in a source file."
+ ;; Stop displaying an arrow in a source file.
+ (setq gud-overlay-arrow-position nil)
+ ;; And any highlight overlays.
+ (when gud-highlight-current-line-overlay
+ (delete-overlay gud-highlight-current-line-overlay)
+ (if destroy-overlay
+ (setq gud-highlight-current-line-overlay nil))))
+
(defun gud-sentinel (proc msg)
(cond ((null (buffer-name (process-buffer proc)))
;; buffer killed
- ;; Stop displaying an arrow in a source file.
- (setq gud-overlay-arrow-position nil)
(set-process-buffer proc nil)
(if (and (boundp 'speedbar-initial-expansion-list-name)
(string-equal speedbar-initial-expansion-list-name "GUD"))
@@ -2963,12 +2971,9 @@ gud-sentinel
(gdb-reset)
(gud-reset)))
((memq (process-status proc) '(signal exit))
- ;; Stop displaying an arrow in a source file.
- (setq gud-overlay-arrow-position nil)
- ;; And any highlight overlays.
- (when gud-highlight-current-line-overlay
- (delete-overlay gud-highlight-current-line-overlay)
- (setq gud-highlight-current-line-overlay nil))
+
+ (gud-hide-current-line-indicator t)
+
(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
'gdbmi)
(gdb-reset)
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 12 Oct 2024 12:26:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Diancheng Wang <diancheng_wang <at> 163.com>
:
bug acknowledged by developer.
(Sat, 12 Oct 2024 12:26:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 73687-done <at> debbugs.gnu.org (full text, mbox):
> From: Diancheng Wang <diancheng_wang <at> 163.com>
> Date: Tue, 08 Oct 2024 11:11:24 +0800
>
> When highlighting current line is enabled with
> gud-highlight-current-line-overlay, the highlighting current line is always
> enabled even debugee is running. Attachment is a patch to fix it. The patch
> introduces a new function 'gud-hide-current-line-indicator', then call it
> when debugee is running in gdb.el.
Thanks, installed on the master branch, and closing the bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 10 Nov 2024 12:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 280 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.