Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tree-sitter] Fix injection bug that happens…
…when some amount of text is deleted at the beginning of a file. When this happens, the “affected range” of the buffer is an empty range from (0, 0) to (0, 0). Tree-sitter's `descendantsOfType` function incorrectly returns results when querying this specific range, so we'll sidestep this by explicitly returning early whenever the affected range is empty instead of trying to (re-)populate injections for a range that can't have any.
- Loading branch information