mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
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.
This commit is contained in:

committed by
GitHub

parent
666a82374d
commit
cf59631f65
@@ -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
|
||||
|
Reference in New Issue
Block a user