summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2022-09-20 18:02:16 -0700
committerYuan Fu <casouri@gmail.com>2022-09-20 18:36:52 -0700
commitcb0464bf4248a8c48e3da2dd0c502091e4ec489a (patch)
treef82850322c2e747384610d9c2217804d798ef336 /lisp
parent55e01229dafad75affbe49446f2aef3fbca2f3a8 (diff)
downloademacs-cb0464bf4248a8c48e3da2dd0c502091e4ec489a.tar.gz
emacs-cb0464bf4248a8c48e3da2dd0c502091e4ec489a.tar.bz2
emacs-cb0464bf4248a8c48e3da2dd0c502091e4ec489a.zip
Fix treesit-query-validate
* lisp/treesit.el (treesit-query-validate): Add a call to treesit-query-expand so this function works on both sexp and string query, as expected.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/treesit.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 709f826f325..9750ac7b7b9 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -1079,7 +1079,7 @@ to the offending pattern and highlight the pattern."
(message (nth 0 data))
(start (nth 1 data)))
(erase-buffer)
- (insert query)
+ (insert (treesit-query-expand query))
(goto-char start)
(search-forward " " nil t)
(put-text-property start (point) 'face 'error)