feat: add drop command for buffers (#2131)
This commit is contained in:
@@ -67,6 +67,7 @@ end
|
|||||||
local edit_buffer
|
local edit_buffer
|
||||||
do
|
do
|
||||||
local map = {
|
local map = {
|
||||||
|
drop = "drop",
|
||||||
edit = "buffer",
|
edit = "buffer",
|
||||||
new = "sbuffer",
|
new = "sbuffer",
|
||||||
vnew = "vert sbuffer",
|
vnew = "vert sbuffer",
|
||||||
@@ -78,7 +79,11 @@ do
|
|||||||
if command == nil then
|
if command == nil then
|
||||||
error "There was no associated buffer command"
|
error "There was no associated buffer command"
|
||||||
end
|
end
|
||||||
|
if command ~= "drop" then
|
||||||
vim.cmd(string.format("%s %d", command, bufnr))
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user