aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/ui.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2024-09-01 13:01:53 -0500
committerGitHub <noreply@github.com>2024-09-01 18:01:53 +0000
commit6913c5e1d975a11262d08b3339d50b579e6b6bb8 (patch)
treee69809ec7eb0c7cb14b505eaf56f9de19b02a349 /runtime/lua/vim/ui.lua
parent318c0415d5b10b44fee4afa06994734f1beb7e71 (diff)
downloadrneovim-6913c5e1d975a11262d08b3339d50b579e6b6bb8.tar.gz
rneovim-6913c5e1d975a11262d08b3339d50b579e6b6bb8.tar.bz2
rneovim-6913c5e1d975a11262d08b3339d50b579e6b6bb8.zip
feat(treesitter)!: default to correct behavior for quantified captures (#30193)
For context, see https://github.com/neovim/neovim/pull/24738. Before that PR, Nvim did not correctly handle captures with quantifiers. That PR made the correct behavior opt-in to minimize breaking changes, with the intention that the correct behavior would eventually become the default. Users can still opt-in to the old (incorrect) behavior for now, but this option will eventually be removed completely. BREAKING CHANGE: Any plugin which uses `Query:iter_matches()` must update their call sites to expect an array of nodes in the `match` table, rather than a single node.
Diffstat (limited to 'runtime/lua/vim/ui.lua')
-rw-r--r--runtime/lua/vim/ui.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua
index c2b19e92c0..2d3b828ea1 100644
--- a/runtime/lua/vim/ui.lua
+++ b/runtime/lua/vim/ui.lua
@@ -196,7 +196,7 @@ function M._get_urls()
local query = vim.treesitter.query.get(lang, 'highlights')
if query then
local tree = assert(ltree:tree_for_range(range))
- for _, match, metadata in query:iter_matches(tree:root(), bufnr, row, row + 1, { all = true }) do
+ for _, match, metadata in query:iter_matches(tree:root(), bufnr, row, row + 1) do
for id, nodes in pairs(match) do
for _, node in ipairs(nodes) do
if vim.treesitter.node_contains(node, range) then