Skip to content

Commit 01cb3a8

Browse files
authored
fix: send_to_quickfix opens loclist when specified (#687)
* fix `send_to_quickfix` opening qf when the target is `loclist` * fix indentation
1 parent 7e1cd77 commit 01cb3a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/oil/util.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,11 +823,12 @@ M.send_to_quickfix = function(opts)
823823
local action = opts.action == "a" and "a" or "r"
824824
if opts.target == "loclist" then
825825
vim.fn.setloclist(0, {}, action, { title = qf_title, items = qf_entries })
826+
vim.cmd.lopen()
826827
else
827828
vim.fn.setqflist({}, action, { title = qf_title, items = qf_entries })
829+
vim.cmd.copen()
828830
end
829831
vim.api.nvim_exec_autocmds("QuickFixCmdPost", {})
830-
vim.cmd.copen()
831832
end
832833

833834
---@return boolean

0 commit comments

Comments
 (0)