From 0792aaebf8cbac0c8545c43ad648b98deb83af42 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 19 May 2024 02:35:15 +0300 Subject: [PATCH] feat: added check barrier for nvim-api dev-version --- lua/specs/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/specs/init.lua b/lua/specs/init.lua index ac75af5..23f4e0f 100644 --- a/lua/specs/init.lua +++ b/lua/specs/init.lua @@ -101,7 +101,11 @@ function M.show_specs(popup) vim.api.nvim_set_option_value("winblend", bl, { win = win_id }) end if dm ~= nil then - config["col"][false] = dm[2] + if type(config["col"]) == "table" then + config["col"][false] = dm[2] + else + config["col"] = dm[2] + end vim.api.nvim_win_set_config(win_id, config) vim.api.nvim_win_set_width(win_id, dm[1]) end