fix: send_to_quickfix opens loclist when specified (#687)
* fix `send_to_quickfix` opening qf when the target is `loclist` * fix indentation
This commit is contained in:
parent
7e1cd7703f
commit
01cb3a8ad7
1 changed files with 2 additions and 1 deletions
|
|
@ -823,11 +823,12 @@ M.send_to_quickfix = function(opts)
|
|||
local action = opts.action == "a" and "a" or "r"
|
||||
if opts.target == "loclist" then
|
||||
vim.fn.setloclist(0, {}, action, { title = qf_title, items = qf_entries })
|
||||
vim.cmd.lopen()
|
||||
else
|
||||
vim.fn.setqflist({}, action, { title = qf_title, items = qf_entries })
|
||||
vim.cmd.copen()
|
||||
end
|
||||
vim.api.nvim_exec_autocmds("QuickFixCmdPost", {})
|
||||
vim.cmd.copen()
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue