diff options
author | L Lllvvuu <git@llllvvuu.dev> | 2023-09-16 02:48:49 -0700 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2023-09-16 13:52:42 +0100 |
commit | 07080f67fe7e526576d5d50777fb122a99b3e183 (patch) | |
tree | f26ba869b3828683ce5936ddce3fd67d7c5b788b /runtime/lua/vim/treesitter/dev.lua | |
parent | 091b57d766a48768ca97240a0ec8f63d2c1aaac0 (diff) | |
download | rneovim-07080f67fe7e526576d5d50777fb122a99b3e183.tar.gz rneovim-07080f67fe7e526576d5d50777fb122a99b3e183.tar.bz2 rneovim-07080f67fe7e526576d5d50777fb122a99b3e183.zip |
perf(treesitter): do not scan past given line for predicate match
Problem
---
If a highlighter query returns a significant number of predicate
non-matches, the highlighter will scan well past the end of the window.
Solution
---
In the iterator returned from `iter_captures`, accept an optional
parameter `end_line`. If no parameter provided, the behavior is
unchanged, hence this is a non-invasive tweak.
Fixes: #25113 nvim-treesitter/nvim-treesitter#5057
Diffstat (limited to 'runtime/lua/vim/treesitter/dev.lua')
0 files changed, 0 insertions, 0 deletions