neovim

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

commit cf59631f65390efcf9ad27cd63003f8711cb9e17
parent 666a82374ddeb9284cbfab9ba21fad2a8f9b1b17
Author: Dmitry Zolotukhin <zlogic@gmail.com>
Date:   Mon,  7 Apr 2025 12:56:40 +0200

fix(treesitter): not refreshing virtualtext contents #33361

Problem: In some cases, when treesitter is enabled, deleting a
line below virtualtext will not refresh all updated lines.
https://github.com/neovim/neovim/issues/33358

Solution: Revert a part of https://github.com/neovim/neovim/pull/31324
to ensure that the full range (with virtual lines) is refreshed.
Diffstat:
Mruntime/lua/vim/treesitter/highlighter.lua | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua @@ -237,7 +237,7 @@ end ---@param changes Range6[] function TSHighlighter:on_changedtree(changes) for _, ch in ipairs(changes) do - api.nvim__redraw({ buf = self.bufnr, range = { ch[1], ch[4] }, flush = false }) + api.nvim__redraw({ buf = self.bufnr, range = { ch[1], ch[4] + 1 }, flush = false }) -- Only invalidate the _conceal_checked range if _conceal_line is set and -- ch[4] is not UINT32_MAX (empty range on first changedtree). if ch[4] == 2 ^ 32 - 1 then