(treesit-query-validate): Fix reusing the output buffer
* lisp/treesit.el (treesit-query-validate): Fix the "Buffer is read-only" error when an output buffer already exists.
This commit is contained in:
parent
d560dc5044
commit
4c49452cde
1 changed files with 2 additions and 1 deletions
|
@ -2380,7 +2380,8 @@ to the offending pattern and highlight the pattern."
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(let* ((data (cdr err))
|
(let* ((data (cdr err))
|
||||||
(message (nth 0 data))
|
(message (nth 0 data))
|
||||||
(start (nth 1 data)))
|
(start (nth 1 data))
|
||||||
|
(inhibit-read-only t))
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(insert (treesit-query-expand query))
|
(insert (treesit-query-expand query))
|
||||||
(goto-char start)
|
(goto-char start)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue