summaryrefslogtreecommitdiff
path: root/lisp/treesit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/treesit.el')
-rw-r--r--lisp/treesit.el4
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)