Files
neovim/runtime/lua/vim
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-09-16 11:41:36 +08:00
2025-08-17 11:54:53 +08:00
2025-09-16 11:41:36 +08:00
2025-06-06 15:36:48 +01:00
2025-07-10 21:50:46 -04:00
2025-09-28 20:57:59 -07:00
2025-09-16 11:41:36 +08:00
2025-09-16 11:41:36 +08:00
2025-09-13 22:49:50 -04:00
2025-09-16 11:41:36 +08:00
2025-06-14 17:24:36 +02:00