From b9cd2416fd67a0f2046c4e5a30e4582259f0e0f4 Mon Sep 17 00:00:00 2001 From: David O'Trakoun Date: Tue, 29 Oct 2024 10:28:17 -0400 Subject: [PATCH] fix doctor min size --- nvim/lua/dko/doctor.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nvim/lua/dko/doctor.lua b/nvim/lua/dko/doctor.lua index 08b8d54d..abd35ecc 100644 --- a/nvim/lua/dko/doctor.lua +++ b/nvim/lua/dko/doctor.lua @@ -46,6 +46,10 @@ M.get_all = function() table.insert(output, table.concat(warnings, "\n")) end + if #errors + #warnings == 0 then + table.insert(output, ("%s ᴀʟʟ ɢᴏᴏᴅ"):format(dkoicons.Ok)) + end + return output end @@ -90,8 +94,8 @@ M.show_float = function() row = 1, } local size = { - height = math.min(#contents, vim.o.lines), - width = math.floor(vim.o.columns / 2), + height = math.max(math.min(#contents, vim.o.lines), 1), + width = math.max(math.floor(vim.o.columns / 2), 1), } local opts = vim.tbl_extend("force", { style = "minimal",