summaryrefslogtreecommitdiff
path: root/lua/telescope/actions/init.lua
diff options
context:
space:
mode:
authoranott03 <amitav_nott@ryecountryday.org>2021-01-27 11:22:11 -0500
committerGitHub <noreply@github.com>2021-01-27 17:22:11 +0100
commit5995a8be8faaa2c6e8693ca52f2320cb4a80e3fa (patch)
treea3fe0a4f64074a1834df3b80e1445cb725b9fdb1 /lua/telescope/actions/init.lua
parentccbb7f56384921a81813f0f9ebc85cdba0b7c255 (diff)
Undo #465 (#469)
We have broke all extension that do some sort of goto_file_selection:replace Problem described here: https://github.com/nvim-telescope/telescope.nvim/pull/465#issuecomment-767831897 Possible solution: https://github.com/nvim-telescope/telescope.nvim/pull/465#issuecomment-767808213
Diffstat (limited to 'lua/telescope/actions/init.lua')
-rw-r--r--lua/telescope/actions/init.lua25
1 files changed, 9 insertions, 16 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua
index 34cfede..50c7f37 100644
--- a/lua/telescope/actions/init.lua
+++ b/lua/telescope/actions/init.lua
@@ -66,7 +66,7 @@ function actions.preview_scrolling_down(prompt_bufnr)
end
-- TODO: It seems sometimes we get bad styling.
-function actions._select(prompt_bufnr, command)
+function actions._goto_file_selection(prompt_bufnr, command)
local entry = actions.get_selected_entry(prompt_bufnr)
if not entry then
@@ -144,29 +144,22 @@ function actions.center(_)
vim.cmd(':normal! zz')
end
-function actions.select(prompt_bufnr)
- actions._select(prompt_bufnr, "edit")
+function actions.goto_file_selection_edit(prompt_bufnr)
+ actions._goto_file_selection(prompt_bufnr, "edit")
end
-function actions.hselect(prompt_bufnr)
- actions._select(prompt_bufnr, "new")
+function actions.goto_file_selection_split(prompt_bufnr)
+ actions._goto_file_selection(prompt_bufnr, "new")
end
-function actions.vselect(prompt_bufnr)
- actions._select(prompt_bufnr, "vnew")
+function actions.goto_file_selection_vsplit(prompt_bufnr)
+ actions._goto_file_selection(prompt_bufnr, "vnew")
end
-function actions.tabselect(prompt_bufnr)
- actions._select(prompt_bufnr, "tabedit")
+function actions.goto_file_selection_tabedit(prompt_bufnr)
+ actions._goto_file_selection(prompt_bufnr, "tabedit")
end
--- aliases
-actions._goto_file_selection = actions._select
-actions.goto_file_selection_edit = actions.select
-actions.goto_file_selection_split = actions.hselect
-actions.goto_file_selection_vsplit = actions.vselect
-actions.goto_file_selection_tabedit = actions.tabselect
-
function actions.close_pum(_)
if 0 ~= vim.fn.pumvisible() then
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<c-y>", true, true, true), 'n', true)