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"
|
local action = opts.action == "a" and "a" or "r"
|
||||||
if opts.target == "loclist" then
|
if opts.target == "loclist" then
|
||||||
vim.fn.setloclist(0, {}, action, { title = qf_title, items = qf_entries })
|
vim.fn.setloclist(0, {}, action, { title = qf_title, items = qf_entries })
|
||||||
|
vim.cmd.lopen()
|
||||||
else
|
else
|
||||||
vim.fn.setqflist({}, action, { title = qf_title, items = qf_entries })
|
vim.fn.setqflist({}, action, { title = qf_title, items = qf_entries })
|
||||||
|
vim.cmd.copen()
|
||||||
end
|
end
|
||||||
vim.api.nvim_exec_autocmds("QuickFixCmdPost", {})
|
vim.api.nvim_exec_autocmds("QuickFixCmdPost", {})
|
||||||
vim.cmd.copen()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---@return boolean
|
---@return boolean
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue