Skip to content

Commit 3f64736

Browse files
committed
Fix capture overlays being wrongly computed when text changes
1 parent da38a23 commit 3f64736

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lisp/tree-sitter-query.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ The buffer on focus when the command is called is set as the target buffer."
9595
(with-current-buffer target-buffer
9696
(unless tree-sitter-mode
9797
(tree-sitter-mode))
98-
(add-hook 'after-change-functions 'tree-sitter-query--after-change nil :local)
98+
;; TODO: The query should be run against the changed range only.
99+
(add-hook 'tree-sitter-after-change-functions 'tree-sitter-query--after-change nil :local)
99100
(setq tree-sitter-query--target-buffer target-buffer))
100101
(unless builder-window-is-visible
101102
(unless (display-buffer-in-side-window

0 commit comments

Comments
 (0)