diff options
| author | Gerd Möllmann | 2023-10-23 07:27:04 +0200 |
|---|---|---|
| committer | Gerd Möllmann | 2023-10-23 07:27:04 +0200 |
| commit | db96cdcc8d82d559322d6a985c834374b97cbd84 (patch) | |
| tree | 3bdd4287e45ed5ac41cfecc35f87937c1d9ca251 | |
| parent | d33a72e8d745931d76dffaa3ea66bbc935ad00b9 (diff) | |
| download | emacs-db96cdcc8d82d559322d6a985c834374b97cbd84.tar.gz emacs-db96cdcc8d82d559322d6a985c834374b97cbd84.zip | |
Fix LLDB prompt in Gud when attached
* lisp/progmodes/gud.el (gud-lldb-marker-filter): Fix the prompt by
replacing multiple spaces with one.
| -rw-r--r-- | lisp/progmodes/gud.el | 8 |
1 files changed, 7 insertions, 1 deletions
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.")) | |||
| 3886 | string) | 3886 | string) |
| 3887 | (setq gud-last-last-frame nil) | 3887 | (setq gud-last-last-frame nil) |
| 3888 | (setq gud-overlay-arrow-position nil))) | 3888 | (setq gud-overlay-arrow-position nil))) |
| 3889 | string) | 3889 | ;; While being attached to a process, LLDB emits control sequences, |
| 3890 | ;; even if TERM is "dumb". This is the case in at least LLDB | ||
| 3891 | ;; version 14 to 17. The control sequences are filtered out by | ||
| 3892 | ;; Emacs after this process filter runs, but LLDB also prints an | ||
| 3893 | ;; extra space after the prompt, which we fix here. | ||
| 3894 | (replace-regexp-in-string (rx "(lldb)" (group (1+ blank)) "\e[8") | ||
| 3895 | " " string nil nil 1)) | ||
| 3890 | 3896 | ||
| 3891 | ;; According to SBCommanInterpreter.cpp, the return value of | 3897 | ;; According to SBCommanInterpreter.cpp, the return value of |
| 3892 | ;; HandleCompletions is as follows: | 3898 | ;; HandleCompletions is as follows: |