summaryrefslogtreecommitdiff
path: root/lua/telescope/actions/init.lua
diff options
context:
space:
mode:
authorConnor Sheehan <sheehan@mozilla.com>2022-02-12 19:00:52 -0500
committerGitHub <noreply@github.com>2022-02-13 03:00:52 +0300
commit88229d5afd23c2325544e8625b111093fed6554b (patch)
tree8f9425cd0d1e7bf2b8dee701f352303b48a88ca8 /lua/telescope/actions/init.lua
parentf58b0d4dd1fe42c817a864c9fd196b3e5115215f (diff)
fix(actions.qflist): make it work with vim quickfix commands (#1742)
use `r` mode to instead use `" "` mode. This makes Telescope quickfix list action send results to a new list in the quickfix stack instead of overwriting the entries in the current list. Doing so enables `:chistory`, `:colder` and `:cnewer` functions to review results of previous Telescope queries. The location list uses a similar API and is updated in this PR also (ie this also enables :lhistory, :lolder and :lnewer).
Diffstat (limited to 'lua/telescope/actions/init.lua')
-rw-r--r--lua/telescope/actions/init.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua
index 7ceb96e..f811a92 100644
--- a/lua/telescope/actions/init.lua
+++ b/lua/telescope/actions/init.lua
@@ -667,7 +667,7 @@ end
--- Sends the selected entries to the quickfix list, replacing the previous entries.
actions.send_selected_to_qflist = function(prompt_bufnr)
- send_selected_to_qf(prompt_bufnr, "r")
+ send_selected_to_qf(prompt_bufnr, " ")
end
--- Adds the selected entries to the quickfix list, keeping the previous entries.
@@ -677,7 +677,7 @@ end
--- Sends all entries to the quickfix list, replacing the previous entries.
actions.send_to_qflist = function(prompt_bufnr)
- send_all_to_qf(prompt_bufnr, "r")
+ send_all_to_qf(prompt_bufnr, " ")
end
--- Adds all entries to the quickfix list, keeping the previous entries.
@@ -687,7 +687,7 @@ end
--- Sends the selected entries to the location list, replacing the previous entries.
actions.send_selected_to_loclist = function(prompt_bufnr)
- send_selected_to_qf(prompt_bufnr, "r", "loclist")
+ send_selected_to_qf(prompt_bufnr, " ", "loclist")
end
--- Adds the selected entries to the location list, keeping the previous entries.
@@ -697,7 +697,7 @@ end
--- Sends all entries to the location list, replacing the previous entries.
actions.send_to_loclist = function(prompt_bufnr)
- send_all_to_qf(prompt_bufnr, "r", "loclist")
+ send_all_to_qf(prompt_bufnr, " ", "loclist")
end
--- Adds all entries to the location list, keeping the previous entries.
@@ -717,7 +717,7 @@ end
--- Sends the selected entries to the quickfix list, replacing the previous entries.
--- If no entry was selected, sends all entries.
actions.smart_send_to_qflist = function(prompt_bufnr)
- smart_send(prompt_bufnr, "r")
+ smart_send(prompt_bufnr, " ")
end
--- Adds the selected entries to the quickfix list, keeping the previous entries.
@@ -729,7 +729,7 @@ end
--- Sends the selected entries to the location list, replacing the previous entries.
--- If no entry was selected, sends all entries.
actions.smart_send_to_loclist = function(prompt_bufnr)
- smart_send(prompt_bufnr, "r", "loclist")
+ smart_send(prompt_bufnr, " ", "loclist")
end
--- Adds the selected entries to the location list, keeping the previous entries.