summaryrefslogtreecommitdiff
path: root/lua/telescope/actions/init.lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2020-11-23 16:11:46 +0100
committerGitHub <noreply@github.com>2020-11-23 10:11:46 -0500
commit863328a96d81d4b93bcfaa0038d429ea24880b0b (patch)
tree4560fcbb47d2c084711d228f70ab58983182d874 /lua/telescope/actions/init.lua
parent2ac0582c06d8a52a42907dde106983e44ae989ef (diff)
feat: Buffers rework (indicators and sorting) (#208)
Diffstat (limited to 'lua/telescope/actions/init.lua')
-rw-r--r--lua/telescope/actions/init.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua
index 9dabfcb..527e0b5 100644
--- a/lua/telescope/actions/init.lua
+++ b/lua/telescope/actions/init.lua
@@ -96,7 +96,15 @@ function actions._goto_file_selection(prompt_bufnr, command)
actions.close(prompt_bufnr)
if entry_bufnr then
- vim.cmd(string.format(":%s #%d", command, entry_bufnr))
+ if command == 'edit' then
+ vim.cmd(string.format(":buffer %d", entry_bufnr))
+ elseif command == 'new' then
+ vim.cmd(string.format(":sbuffer %d", entry_bufnr))
+ elseif command == 'vnew' then
+ vim.cmd(string.format(":vert sbuffer %d", entry_bufnr))
+ elseif command == 'tabedit' then
+ vim.cmd(string.format(":tab sb %d", entry_bufnr))
+ end
else
filename = path.normalize(filename, vim.fn.getcwd())