diff options
| author | Mattias EngdegÄrd | 2023-10-25 12:14:57 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2023-10-25 12:14:57 +0200 |
| commit | e3da8edf5e56ef4044da76ac2991aff0dedc33f5 (patch) | |
| tree | d80787558b90dcac8dfe23bfad4dc6c1a252527d | |
| parent | b36e2b1772680b8fce067c6ea2cdf582af982aaa (diff) | |
| download | emacs-e3da8edf5e56ef4044da76ac2991aff0dedc33f5.tar.gz emacs-e3da8edf5e56ef4044da76ac2991aff0dedc33f5.zip | |
LLDB support: cope with inserted text being write-protected
* lisp/progmodes/gud.el (gud-lldb-marker-filter):
Force deletion of the part of the buffer being moved back into
filtering again (bug#66738).
| -rw-r--r-- | lisp/progmodes/gud.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 8692a6be023..70af736372e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -3905,7 +3905,8 @@ so they have been disabled.")) | |||
| 3905 | ;; can delete parts of it. | 3905 | ;; can delete parts of it. |
| 3906 | (setq string (concat (buffer-substring-no-properties bol (point)) | 3906 | (setq string (concat (buffer-substring-no-properties bol (point)) |
| 3907 | string)) | 3907 | string)) |
| 3908 | (delete-region bol (point)))) | 3908 | (let ((inhibit-read-only t)) |
| 3909 | (delete-region bol (point))))) | ||
| 3909 | (let ((ofs 0)) | 3910 | (let ((ofs 0)) |
| 3910 | (while (string-match (rx (group (* (not (in "\e\n")))) ; preceding chars | 3911 | (while (string-match (rx (group (* (not (in "\e\n")))) ; preceding chars |
| 3911 | "\e[" ; CSI | 3912 | "\e[" ; CSI |
| @@ -3926,12 +3927,13 @@ so they have been disabled.")) | |||
| 3926 | 0))) | 3927 | 0))) |
| 3927 | ;; Erase in display (ED): no further action. | 3928 | ;; Erase in display (ED): no further action. |
| 3928 | prefix-end))) | 3929 | prefix-end))) |
| 3930 | ;; Delete the control sequence and possibly part of the preceding chars. | ||
| 3929 | (setq string (concat (substring string 0 keep-end) | 3931 | (setq string (concat (substring string 0 keep-end) |
| 3930 | (substring string end))) | 3932 | (substring string end))) |
| 3931 | (setq ofs start)))) | 3933 | (setq ofs start)))) |
| 3932 | string) | 3934 | string) |
| 3933 | 3935 | ||
| 3934 | ;; According to SBCommanInterpreter.cpp, the return value of | 3936 | ;; According to SBCommandInterpreter.cpp, the return value of |
| 3935 | ;; HandleCompletions is as follows: | 3937 | ;; HandleCompletions is as follows: |
| 3936 | ;; | 3938 | ;; |
| 3937 | ;; Index 1 to the end contain all the completions. | 3939 | ;; Index 1 to the end contain all the completions. |