aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorDmitry Zolotukhin <zlogic@gmail.com>2025-04-07 12:56:40 +0200
committerGitHub <noreply@github.com>2025-04-07 03:56:40 -0700
commitcf59631f65390efcf9ad27cd63003f8711cb9e17 (patch)
treef7a8207e1b8dd991181f42248fb6e7f9535adb88 /runtime/lua/vim
parent666a82374ddeb9284cbfab9ba21fad2a8f9b1b17 (diff)
downloadrneovim-cf59631f65390efcf9ad27cd63003f8711cb9e17.tar.gz
rneovim-cf59631f65390efcf9ad27cd63003f8711cb9e17.tar.bz2
rneovim-cf59631f65390efcf9ad27cd63003f8711cb9e17.zip
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 (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/treesitter/highlighter.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua
index 46f02628ad..9969cb9dce 100644
--- 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