From 5596c2a25a49ca235613c804169b9063e20b05f5 Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 11 Dec 2021 00:33:18 +0000 Subject: [PATCH] fix: x, y, z hl group not setting correctly (#484) Highlight groups for x, y, z would only set correctly if theme had normal mode explicitly set --- lua/lualine/highlight.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lualine/highlight.lua b/lua/lualine/highlight.lua index 8491410..f41e5e4 100644 --- a/lua/lualine/highlight.lua +++ b/lua/lualine/highlight.lua @@ -249,11 +249,11 @@ end ---@param is_focused boolean ---@return string formatted highlight group name function M.format_highlight(highlight_group, is_focused) - if highlight_group > 'lualine_c' and not M.highlight_exists(highlight_group .. '_normal') then + local highlight_name = M.append_mode(highlight_group, is_focused) + if highlight_group > 'lualine_c' and not M.highlight_exists(highlight_name) then highlight_group = 'lualine_' .. section_highlight_map[highlight_group:match 'lualine_(.)'] + highlight_name = M.append_mode(highlight_group, is_focused) end - local highlight_name - highlight_name = M.append_mode(highlight_group, is_focused) if M.highlight_exists(highlight_name) then return '%#' .. highlight_name .. '#' end