From b3ccce1ee762638c04abdb63fc537a3b939a3d8a Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sat, 20 Sep 2025 22:09:20 -0400 Subject: [PATCH] fix(color): fix ansi hl condition --- lua/cp/ansi.lua | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lua/cp/ansi.lua b/lua/cp/ansi.lua index c8e2a01..642b624 100644 --- a/lua/cp/ansi.lua +++ b/lua/cp/ansi.lua @@ -194,17 +194,9 @@ function M.setup_highlight_groups() BrightWhite = vim.g.terminal_color_15, } - local missing_color = false - for _, terminal_color in pairs(color_map) do - if terminal_color == nil then - missing_color = true - break - end - end - - if missing_color or #color_map == 0 then + if vim.tbl_count(color_map) < 16 then logger.log( - 'ansi terminal colors (vim.g.terminal_color_*) not configured. . ANSI colors will not display properly. ', + 'ansi terminal colors (vim.g.terminal_color_*) not configured. ANSI colors will not display properly. ', vim.log.levels.WARN ) end