fix: 0 is truthy in lua????

This commit is contained in:
əlemi 2024-09-25 23:35:17 +02:00
parent 9ea2827277
commit db56df9c58
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -13,7 +13,7 @@ local ticks = {}
---@param content? string if provided, set this content after attaching ---@param content? string if provided, set this content after attaching
---@param nowait? boolean skip waiting for initial content sync ---@param nowait? boolean skip waiting for initial content sync
local function attach(name, buffer, content, nowait) 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!") error("buffer '" .. name .. "' already exists!")
end end