From d6ce595aba6667ac5b7b5d6fc12545fec24878fd Mon Sep 17 00:00:00 2001 From: Tae Sandoval <1188977+tssm@users.noreply.github.com> Date: Thu, 4 Feb 2021 21:03:40 +0100 Subject: [PATCH] feat: Open quickfix list on it's own action (#497) Given that Telescope has a picker for quickfix items, opening its window automatically isn't that useful, so this commit removes the call from send_to_qflist and send_selected_to_qflist. Some users may prefer the old behaviour though so a new action open_qflist was created. To open quickfix with one key, you can do this: ``` [""] = actions.send_to_qflist + actions.open_qflist, ``` Co-authored-by: Tae Sandoval --- lua/telescope/actions/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 50c7f37..4e82777 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -304,7 +304,6 @@ actions.send_selected_to_qflist = function(prompt_bufnr) actions.close(prompt_bufnr) vim.fn.setqflist(qf_entries, 'r') - vim.cmd [[copen]] end actions.send_to_qflist = function(prompt_bufnr) @@ -319,6 +318,9 @@ actions.send_to_qflist = function(prompt_bufnr) actions.close(prompt_bufnr) vim.fn.setqflist(qf_entries, 'r') +end + +actions.open_qflist = function(_) vim.cmd [[copen]] end