mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-21 15:04:52 +01:00
feat: allow detaching from buffers with 'a'
not really the best key but better than nothing i guess...
This commit is contained in:
parent
2d41812e23
commit
9e48af37fe
1 changed files with 9 additions and 0 deletions
|
@ -164,6 +164,15 @@ M.add = function(state, path, extra)
|
|||
print("invited user " .. input .. " to workspace " .. selected.name)
|
||||
end)
|
||||
end)
|
||||
elseif selected.type == "buffer" then
|
||||
if buf_manager.map_rev[selected.name] ~= nil then
|
||||
vim.ui.input({ prompt = "detach from '" .. selected.name .. "'?" }, function (choice)
|
||||
if not vim.startswith(string.lower(choice), "y") then return end
|
||||
if not CODEMP.workspace:detach(selected.name) then
|
||||
print(" /!\\ dangling reference, detach incomplete")
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue