Files
neovim/runtime/lua
Nathan B. faf8345eef fix(diagnostic): don't accumulate BufRead autocmds for unloaded buffers #40869
Problem:
vim.diagnostic.set() defers extmark position computation for an
unloaded buffer via a once=true BufRead autocmd, registering a new one
on every call without replacing the previous one. Each pending autocmd
also retains that call's diagnostics.

Solution:
Instead of registering an autocmd per set() call, register a single
static BufRead autocmd that computes positions from the diagnostic
cache for any buffer with cached diagnostics when it is read. This
removes the per-call registration entirely (nothing left to
accumulate) and means diagnostics cleared while the buffer was
unloaded no longer produce stale extmarks.
2026-08-13 09:17:16 -04:00
..
2026-03-16 10:29:58 +01:00
2025-02-09 18:10:54 +01:00