mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
fix(diagnostic): resolve buffer number in get() (#16407)
This commit is contained in:
@@ -395,6 +395,7 @@ local function get_diagnostics(bufnr, opts, clamp)
|
||||
end
|
||||
end
|
||||
elseif namespace == nil then
|
||||
bufnr = get_bufnr(bufnr)
|
||||
for iter_namespace in pairs(diagnostic_cache[bufnr]) do
|
||||
for _, diagnostic in pairs(diagnostic_cache[bufnr][iter_namespace]) do
|
||||
add(diagnostic)
|
||||
@@ -407,6 +408,7 @@ local function get_diagnostics(bufnr, opts, clamp)
|
||||
end
|
||||
end
|
||||
else
|
||||
bufnr = get_bufnr(bufnr)
|
||||
for _, diagnostic in pairs(diagnostic_cache[bufnr][namespace] or {}) do
|
||||
add(diagnostic)
|
||||
end
|
||||
|
Reference in New Issue
Block a user