From 0e074bcf739e8ab349bc395fdbe14406d929d674 Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 10 Jan 2025 16:41:36 +0100 Subject: [PATCH] fix: create buf synchronously when sharing --- lua/codemp/command.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/codemp/command.lua b/lua/codemp/command.lua index 53762a6..07c763a 100644 --- a/lua/codemp/command.lua +++ b/lua/codemp/command.lua @@ -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