mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
fix(diagnostic): only store quickfix id when creating a new one #31466
The old code would always update `_qf_id` with the current quickfix, even if you're currently looking at a completely different, non-diagnostics quickfix list. This completely defeats the intent of <https://github.com/neovim/neovim/pull/30868>, whoops!
This commit is contained in:
committed by
GitHub
parent
12901447cb
commit
fd902b1cb2
@ -867,7 +867,9 @@ local function set_list(loclist, opts)
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Get the id of the newly created quickfix list.
|
-- Get the id of the newly created quickfix list.
|
||||||
_qf_id = vim.fn.getqflist({ id = 0 }).id
|
if _qf_id == nil then
|
||||||
|
_qf_id = vim.fn.getqflist({ id = 0 }).id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if open then
|
if open then
|
||||||
api.nvim_command(loclist and 'lwindow' or 'botright cwindow')
|
api.nvim_command(loclist and 'lwindow' or 'botright cwindow')
|
||||||
|
Reference in New Issue
Block a user