mirror of
https://github.com/neovim/neovim.git
synced 2025-09-09 12:58:16 +00:00
fix(diagnostic): set effective buffer number for DiagnosticChanged autocmd (#16485)
This enables use of <abuf> in autocommand handlers for DiagnosticChanged.
This commit is contained in:
![41898282+github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
fb11ef0aad
commit
84784a8391
@@ -653,9 +653,11 @@ function M.set(namespace, bufnr, diagnostics, opts)
|
|||||||
M.show(namespace, bufnr, nil, opts)
|
M.show(namespace, bufnr, nil, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_command(
|
vim.api.nvim_buf_call(bufnr, function()
|
||||||
string.format("doautocmd <nomodeline> DiagnosticChanged %s", vim.api.nvim_buf_get_name(bufnr))
|
vim.api.nvim_command(
|
||||||
)
|
string.format("doautocmd <nomodeline> DiagnosticChanged %s", vim.api.nvim_buf_get_name(bufnr))
|
||||||
|
)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get namespace metadata.
|
--- Get namespace metadata.
|
||||||
|
Reference in New Issue
Block a user