fix(actions): set location list title (#2741)

This commit is contained in:
Giuseppe Rota
2023-10-23 09:57:47 +02:00
committed by GitHub
parent 3a2579e203
commit 8c9fd22952

View File

@@ -950,11 +950,12 @@ local send_all_to_qf = function(prompt_bufnr, mode, target)
actions.close(prompt_bufnr)
vim.api.nvim_exec_autocmds("QuickFixCmdPre", {})
local qf_title = string.format([[%s (%s)]], picker.prompt_title, prompt)
if target == "loclist" then
vim.fn.setloclist(picker.original_win_id, qf_entries, mode)
vim.fn.setloclist(picker.original_win_id, {}, "a", { title = qf_title })
else
vim.fn.setqflist(qf_entries, mode)
local qf_title = string.format([[%s (%s)]], picker.prompt_title, prompt)
vim.fn.setqflist({}, "a", { title = qf_title })
end
vim.api.nvim_exec_autocmds("QuickFixCmdPost", {})