diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2022-12-18 03:19:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-17 19:19:15 -0700 |
commit | 1743359235206cbd9da2e0589f1caba37cce3b8c (patch) | |
tree | 8c72770e496f916941af352ffb73d026191d5306 /runtime/lua/vim/_init_packages.lua | |
parent | 1c4794944deb734b24b4a424c50b766a96e050dd (diff) | |
download | rneovim-1743359235206cbd9da2e0589f1caba37cce3b8c.tar.gz rneovim-1743359235206cbd9da2e0589f1caba37cce3b8c.tar.bz2 rneovim-1743359235206cbd9da2e0589f1caba37cce3b8c.zip |
fix(diagnostic): clear stale cache on reset (#21454)
The BufWipeout autocmd is not 100% reliable and may leave stale entries
in the cache. This is sort of a hack/workaround to ensure
`vim.diagnostic.reset` calls don't fail if there are stale cache entries
but instead clears them
Fixes errors like
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: Invalid buffer id: 22
stack traceback:
[C]: in function 'nvim_exec_autocmds'
/usr/share/nvim/runtime/lua/vim/diagnostic.lua:1458: in function 'reset'
Diffstat (limited to 'runtime/lua/vim/_init_packages.lua')
0 files changed, 0 insertions, 0 deletions