mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +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.
(cherry picked from commit cf59631f65
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
c158d41cec
commit
4c1121bd33
@@ -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