diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-06-29 20:23:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 20:23:02 +0200 |
commit | 384f9870f62f9e67fab45b717d8536d52080c473 (patch) | |
tree | 6fce68c343b405b6d92c524ef3e227a47e381422 /src | |
parent | 845d5ab30549ed1750bfadc2aa5cad7e2127b07f (diff) | |
parent | 7e8a8482e8e474b9ec45c1bd147dd0b0f4ff03af (diff) | |
download | rneovim-384f9870f62f9e67fab45b717d8536d52080c473.tar.gz rneovim-384f9870f62f9e67fab45b717d8536d52080c473.tar.bz2 rneovim-384f9870f62f9e67fab45b717d8536d52080c473.zip |
Merge pull request #14930 from clason/ts-ifdef-fixup
fixup(ts): put ts_query_cursor_set_match_limit behind feature guard
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/lua/treesitter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index 11d30aae09..e3fa48f530 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -1073,7 +1073,11 @@ static int node_rawquery(lua_State *L) // TODO(bfredl): these are expensive allegedly, // use a reuse list later on? TSQueryCursor *cursor = ts_query_cursor_new(); + // TODO(clason): API introduced after tree-sitter release 0.19.5 + // remove guard when minimum ts version is bumped to 0.19.6+ +#ifdef NVIM_TS_HAS_SET_MATCH_LIMIT ts_query_cursor_set_match_limit(cursor, 32); +#endif ts_query_cursor_exec(cursor, query, node); bool captures = lua_toboolean(L, 3); |