Problem: the deferred filetype retry in ensure_cache created an infinite invalidation loop. did_filetype() stays 1 for the lifetime of a buffer opened via FileType autocmd — it never resets in vim.schedule callbacks. Each retry reparsed, found has_nil_ft=true again, and scheduled another retry. Each iteration cleared all extmarks via pending_clear, causing the deferred syntax pass to bail on its tick check. Result: language syntax highlighting never settled on buffers containing files with function-handled extensions (.sh, .bash, .conf, etc). Solution: add ft_retry_pending guard table. Set before scheduling the retry, check before scheduling again. The flag is set while the callback is pending and during the synchronous redraw inside it, preventing the reparse from scheduling another iteration. Cleared after the callback completes. Cleaned up on BufWipeout. |
||
|---|---|---|
| .. | ||
| commands.lua | ||
| conflict.lua | ||
| debug.lua | ||
| diff.lua | ||
| fugitive.lua | ||
| git.lua | ||
| health.lua | ||
| highlight.lua | ||
| init.lua | ||
| lib.lua | ||
| log.lua | ||
| merge.lua | ||
| parser.lua | ||