refactor: restore deferred syntax debug logging

This commit is contained in:
Barrett Ruth 2026-03-04 14:05:06 -05:00
parent 7fddcd8882
commit 2917c4c73f
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -782,12 +782,14 @@ local function init()
end
if #deferred_syntax > 0 then
local tick = entry.tick
dbg('deferred syntax scheduled: %d hunks tick=%d', #deferred_syntax, tick)
vim.schedule(function()
if not vim.api.nvim_buf_is_valid(bufnr) then
return
end
local cur = hunk_cache[bufnr]
if not cur or cur.tick ~= tick then
dbg('deferred syntax stale: cur.tick=%s captured=%d', cur and tostring(cur.tick) or 'nil', tick)
return
end
local t1 = config.debug and vim.uv.hrtime() or nil