aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_defaults.lua
diff options
context:
space:
mode:
authorSergei Slipchenko <faergeek@gmail.com>2025-10-02 07:17:55 +0400
committerGitHub <noreply@github.com>2025-10-01 20:17:55 -0700
commita1bc5d0ae6a90bb0f5d466c375328c7c3cf35bec (patch)
treea70320a53a4f9fdfa1b30a35d71c10d341711359 /runtime/lua/vim/_defaults.lua
parent237827a0da9ee8afaf1065f4bf6de45030d6d6c3 (diff)
downloadrneovim-a1bc5d0ae6a90bb0f5d466c375328c7c3cf35bec.tar.gz
rneovim-a1bc5d0ae6a90bb0f5d466c375328c7c3cf35bec.tar.bz2
rneovim-a1bc5d0ae6a90bb0f5d466c375328c7c3cf35bec.zip
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.
Diffstat (limited to 'runtime/lua/vim/_defaults.lua')
0 files changed, 0 insertions, 0 deletions