diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-05-11 12:08:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 12:08:33 +0100 |
commit | e124672ce9a81e0ca32e6c30ea3730ad5fe981af (patch) | |
tree | fd175b3c3c7ec56bfadc75ca00f65a39d42b3c7f /src/nvim/lua/treesitter.c | |
parent | af040c3a079f6e25db0ad6b908aa1327f67deb82 (diff) | |
download | rneovim-e124672ce9a81e0ca32e6c30ea3730ad5fe981af.tar.gz rneovim-e124672ce9a81e0ca32e6c30ea3730ad5fe981af.tar.bz2 rneovim-e124672ce9a81e0ca32e6c30ea3730ad5fe981af.zip |
fix(treesitter): reset cursor max_start_depth
Diffstat (limited to 'src/nvim/lua/treesitter.c')
-rw-r--r-- | src/nvim/lua/treesitter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index 0c4700ccab..0c16d09b63 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -1349,6 +1349,11 @@ static int node_rawquery(lua_State *L) } else { cursor = ts_query_cursor_new(); } + +#ifdef NVIM_TS_HAS_SET_MAX_START_DEPTH + // reset the start depth + ts_query_cursor_set_max_start_depth(cursor, 0); +#endif ts_query_cursor_set_match_limit(cursor, 256); ts_query_cursor_exec(cursor, query, node); |