fix(diagnostic): set effective buffer number in autocmd (again) (#16590)

Follow up to #16474.
This commit is contained in:
github-actions[bot] 2021-12-08 21:15:04 -07:00 committed by GitHub
parent beac24d6f3
commit 08ddfa9851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1341,12 +1341,14 @@ function M.reset(namespace, bufnr)
end
end
vim.api.nvim_command(
string.format(
"doautocmd <nomodeline> DiagnosticChanged %s",
vim.fn.fnameescape(vim.api.nvim_buf_get_name(bufnr))
vim.api.nvim_buf_call(bufnr, function()
vim.api.nvim_command(
string.format(
"doautocmd <nomodeline> DiagnosticChanged %s",
vim.fn.fnameescape(vim.api.nvim_buf_get_name(bufnr))
)
)
)
end)
end
--- Add all diagnostics to the quickfix list.