neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 469e6bfc56aa18350bfab13bef8a51b02a5b3c65
parent b83f949fd973f071db1ff522cc3acda0423f4faf
Author: danilax999 <75566563+danilax999@users.noreply.github.com>
Date:   Tue,  4 Apr 2023 14:26:21 +0300

fix(treesitter): use capture metadata range if exists 

use `treesitter.get_range` instead of inline expression
Diffstat:
Mruntime/lua/vim/treesitter/highlighter.lua | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua @@ -236,7 +236,8 @@ local function on_line_impl(self, buf, line, is_spell_nav) break end - local start_row, start_col, end_row, end_col = node:range() + local range = vim.treesitter.get_range(node, buf, metadata[capture]) + local start_row, start_col, _, end_row, end_col, _ = unpack(range) local hl = highlighter_query.hl_cache[capture] local capture_name = highlighter_query:query().captures[capture]