diff options
| author | Ryan Blonna <n0.b741n37+Github@gmail.com> | 2022-08-13 19:18:17 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-13 11:18:17 +0200 |
| commit | d793de0f12d874c463e81edabee741b802c1a37a (patch) | |
| tree | 60133782e6df46758ad063d28698842fc616d6d6 /lua/telescope/actions/set.lua | |
| parent | 12c08bfde707c07b5bdd13e99243a99220443523 (diff) | |
feat: add drop command for buffers (#2131)
Diffstat (limited to 'lua/telescope/actions/set.lua')
| -rw-r--r-- | lua/telescope/actions/set.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/telescope/actions/set.lua b/lua/telescope/actions/set.lua index c2b25d5..6177c9b 100644 --- a/lua/telescope/actions/set.lua +++ b/lua/telescope/actions/set.lua @@ -67,6 +67,7 @@ end local edit_buffer do local map = { + drop = "drop", edit = "buffer", new = "sbuffer", vnew = "vert sbuffer", @@ -78,7 +79,11 @@ do if command == nil then error "There was no associated buffer command" end - vim.cmd(string.format("%s %d", command, bufnr)) + if command ~= "drop" then + vim.cmd(string.format("%s %d", command, bufnr)) + else + vim.cmd(string.format("%s %s", command, vim.api.nvim_buf_get_name(bufnr))) + end end end |
