]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix treesit-query-validate
authorYuan Fu <casouri@gmail.com>
Wed, 21 Sep 2022 01:02:16 +0000 (18:02 -0700)
committerYuan Fu <casouri@gmail.com>
Wed, 21 Sep 2022 01:36:52 +0000 (18:36 -0700)
* 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

index 709f826f3257fa1580723f3304e150c607b2d40d..9750ac7b7b943fbf40b403e858e85362f6fd93e2 100644 (file)
@@ -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)