diff options
author | nverno <noah.v.peart@gmail.com> | 2023-10-07 19:36:44 -0700 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2023-10-08 22:00:32 -0700 |
commit | 53292c5d8186dfac5c82b0d16a10d91c691ae75f (patch) | |
tree | 8b10b5339a5c11d784270c4edc09c3ed6b7ba000 /lisp/treesit.el | |
parent | 81a0c1ed2e437f94edaef0c9d3b5740d36f47181 (diff) | |
download | emacs-53292c5d8186dfac5c82b0d16a10d91c691ae75f.tar.gz emacs-53292c5d8186dfac5c82b0d16a10d91c691ae75f.tar.bz2 emacs-53292c5d8186dfac5c82b0d16a10d91c691ae75f.zip |
Fix treesit-query-validate for string input (bug#66400)
* lisp/treesit.el (treesit-query-validate): Don't expand if QUERY is
string.
Diffstat (limited to 'lisp/treesit.el')
-rw-r--r-- | lisp/treesit.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el index 98eac7f6d63..e8d57dfcd06 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2528,7 +2528,9 @@ to the offending pattern and highlight the pattern." (start (nth 1 data)) (inhibit-read-only t)) (erase-buffer) - (insert (treesit-query-expand query)) + (insert (if (stringp query) + query + (treesit-query-expand query))) (goto-char start) (search-forward " " nil t) (put-text-property start (point) 'face 'error) |