fix: added back create function

This commit is contained in:
əlemi 2024-09-06 15:13:36 +02:00
parent dfd3ae84f5
commit 2176d32540
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -125,11 +125,22 @@ local function sync(buffer)
print(" !! buffer not managed") print(" !! buffer not managed")
end end
local function create(buffer)
if buffer == nil then
buffer = vim.fn.expand("%p")
end
if session.workspace == nil then
error("join a workspace first")
end
session.workspace:create_buffer(buffer):await()
end
return { return {
sync = sync, sync = sync,
attach = attach, attach = attach,
detach = detach, detach = detach,
create = create,
map = id_buffer_map, map = id_buffer_map,
map_rev = buffer_id_map, map_rev = buffer_id_map,
ticks = ticks, ticks = ticks,