fix(init): force redraw after deferred filetype retry
Problem: vim.cmd.redraw() (without bang) is a no-op when the screen is
not dirty. After invalidate_cache() sets tick=-1, Neovim has no reason
to redraw, so the decoration provider is never called, on_buf never
reparses, and the deferred syntax pass bails on the stale tick mismatch.
Solution: use vim.cmd('redraw!') which forces a full screen redraw
regardless of dirty state, ensuring on_buf fires, the cache is reparsed
with did_filetype()=0 resolved filetypes, and the deferred syntax pass
completes with a valid tick.
This commit is contained in:
parent
e02fff2b24
commit
7fddcd8882
1 changed files with 1 additions and 1 deletions
|
|
@ -343,7 +343,7 @@ local function ensure_cache(bufnr)
|
|||
if vim.api.nvim_buf_is_valid(bufnr) and hunk_cache[bufnr] then
|
||||
dbg('retrying filetype detection for buffer %d (was blocked by did_filetype)', bufnr)
|
||||
invalidate_cache(bufnr)
|
||||
vim.cmd.redraw()
|
||||
vim.cmd('redraw!')
|
||||
end
|
||||
ft_retry_pending[bufnr] = nil
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue