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
This commit is contained in:
Tom 2021-12-11 00:33:18 +00:00 committed by GitHub
parent 3a17e2dbca
commit 5596c2a25a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -249,11 +249,11 @@ end
---@param is_focused boolean ---@param is_focused boolean
---@return string formatted highlight group name ---@return string formatted highlight group name
function M.format_highlight(highlight_group, is_focused) 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_group = 'lualine_' .. section_highlight_map[highlight_group:match 'lualine_(.)']
end
local highlight_name
highlight_name = M.append_mode(highlight_group, is_focused) highlight_name = M.append_mode(highlight_group, is_focused)
end
if M.highlight_exists(highlight_name) then if M.highlight_exists(highlight_name) then
return '%#' .. highlight_name .. '#' return '%#' .. highlight_name .. '#'
end end