[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master db96cdcc8d8: Fix LLDB prompt in Gud when attached
From: |
Gerd Moellmann |
Subject: |
master db96cdcc8d8: Fix LLDB prompt in Gud when attached |
Date: |
Mon, 23 Oct 2023 01:28:35 -0400 (EDT) |
branch: master
commit db96cdcc8d82d559322d6a985c834374b97cbd84
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Fix LLDB prompt in Gud when attached
* lisp/progmodes/gud.el (gud-lldb-marker-filter): Fix the prompt by
replacing multiple spaces with one.
---
lisp/progmodes/gud.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 02a1597340b..d3064b6116c 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3886,7 +3886,13 @@ so they have been disabled."))
string)
(setq gud-last-last-frame nil)
(setq gud-overlay-arrow-position nil)))
- string)
+ ;; While being attached to a process, LLDB emits control sequences,
+ ;; even if TERM is "dumb". This is the case in at least LLDB
+ ;; version 14 to 17. The control sequences are filtered out by
+ ;; Emacs after this process filter runs, but LLDB also prints an
+ ;; extra space after the prompt, which we fix here.
+ (replace-regexp-in-string (rx "(lldb)" (group (1+ blank)) "\e[8")
+ " " string nil nil 1))
;; According to SBCommanInterpreter.cpp, the return value of
;; HandleCompletions is as follows:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master db96cdcc8d8: Fix LLDB prompt in Gud when attached,
Gerd Moellmann <=