Files
neovim/runtime/lua
Sergei Slipchenko a1bc5d0ae6 fix(diagnostics): showing stale diagnostics in handlers #35890
Fixes #35884

Problem: Since `once_buf_loaded` might call a callback passed to it at a
later point (which is it's reason to exist) that callback might end up
referring to stale diagnostics in a handler's `show` function. For
example, if we first call `vim.diagnostic.set` for an unloaded buffer,
then call `vim.diagnostic.reset` and only then load the buffer, we might
still see diagnostics from `vim.diagnostic.set` call, which are stale at
this point.

Solution: only keep one autocommand from the most reset `show` call and
delete it when `hide` is called.
2025-10-01 20:17:55 -07:00
..
2025-05-17 10:59:14 +02:00
2025-02-09 18:10:54 +01:00