From db56df9c584096ed2bc484b83512dc8e1205d3ae Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 25 Sep 2024 23:35:17 +0200 Subject: [PATCH] fix: 0 is truthy in lua???? --- lua/codemp/buffers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/codemp/buffers.lua b/lua/codemp/buffers.lua index b7ebc41..2284251 100644 --- a/lua/codemp/buffers.lua +++ b/lua/codemp/buffers.lua @@ -13,7 +13,7 @@ local ticks = {} ---@param content? string if provided, set this content after attaching ---@param nowait? boolean skip waiting for initial content sync local function attach(name, buffer, content, nowait) - if vim.fn.bufexists(name) then + if vim.fn.bufexists(name) == 1 then error("buffer '" .. name .. "' already exists!") end