refactor: restore deferred syntax debug logging
This commit is contained in:
parent
7fddcd8882
commit
2917c4c73f
1 changed files with 2 additions and 0 deletions
|
|
@ -782,12 +782,14 @@ local function init()
|
||||||
end
|
end
|
||||||
if #deferred_syntax > 0 then
|
if #deferred_syntax > 0 then
|
||||||
local tick = entry.tick
|
local tick = entry.tick
|
||||||
|
dbg('deferred syntax scheduled: %d hunks tick=%d', #deferred_syntax, tick)
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
if not vim.api.nvim_buf_is_valid(bufnr) then
|
if not vim.api.nvim_buf_is_valid(bufnr) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local cur = hunk_cache[bufnr]
|
local cur = hunk_cache[bufnr]
|
||||||
if not cur or cur.tick ~= tick then
|
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
|
return
|
||||||
end
|
end
|
||||||
local t1 = config.debug and vim.uv.hrtime() or nil
|
local t1 = config.debug and vim.uv.hrtime() or nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue