fix: reset diagnostics when lazy view buffer closes

This commit is contained in:
Folke Lemaitre 2022-11-25 22:48:37 +01:00
parent 3e8fbaffba
commit 04dea38794
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,6 @@
local Util = require("lazy.util") local Util = require("lazy.util")
local Render = require("lazy.view.render") local Render = require("lazy.view.render")
local Config = require("lazy.core.config")
local M = {} local M = {}
@ -42,6 +43,7 @@ function M.show()
local function close() local function close()
M._buf = nil M._buf = nil
vim.diagnostic.reset(Config.ns, buf)
if vim.api.nvim_buf_is_valid(buf) then if vim.api.nvim_buf_is_valid(buf) then
vim.api.nvim_buf_delete(buf, { vim.api.nvim_buf_delete(buf, {