fix: create buf synchronously when sharing

This commit is contained in:
əlemi 2025-01-10 16:41:36 +01:00
parent 683376be6e
commit 0e074bcf73
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -107,7 +107,9 @@ local joined_actions = {
end
if #path > 0 then
local buf = vim.api.nvim_get_current_buf()
if not bang then buffers.create(path) end
if not bang then
CODEMP.workspace:create_buffer(path):await()
end
local content = utils.buffer.get_content(buf)
buffers.attach(path, { buffer = buf, content = content, skip_exists_check = true })
require('codemp.window').update() -- TODO would be nice to do automatically inside