[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/tree-sitter cb0464bf42 2/4: Fix treesit-query-validate
From: |
Yuan Fu |
Subject: |
feature/tree-sitter cb0464bf42 2/4: Fix treesit-query-validate |
Date: |
Thu, 22 Sep 2022 14:29:03 -0400 (EDT) |
branch: feature/tree-sitter
commit cb0464bf4248a8c48e3da2dd0c502091e4ec489a
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
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.
---
lisp/treesit.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 709f826f32..9750ac7b7b 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)