From 01cb3a8ad7d5e8707041edc775af83dbf33838f4 Mon Sep 17 00:00:00 2001 From: Zijian <43778097+znxuz@users.noreply.github.com> Date: Sat, 22 Nov 2025 02:45:13 +0100 Subject: [PATCH] fix: send_to_quickfix opens loclist when specified (#687) * fix `send_to_quickfix` opening qf when the target is `loclist` * fix indentation --- lua/oil/util.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/oil/util.lua b/lua/oil/util.lua index d000071..894027e 100644 --- a/lua/oil/util.lua +++ b/lua/oil/util.lua @@ -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