diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua index dbf4f56032..b8ffb26377 100644 --- a/runtime/lua/vim/diagnostic.lua +++ b/runtime/lua/vim/diagnostic.lua @@ -867,7 +867,9 @@ local function set_list(loclist, opts) }) -- 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 if open then api.nvim_command(loclist and 'lwindow' or 'botright cwindow')