Merge pull request #129 from shadmansaleh/fix_bug_component_highlights_not_blending_with_bg
fix bug component highlights not blending with bg
This commit is contained in:
commit
d5150f481e
|
@ -39,3 +39,5 @@ luac.out
|
|||
*.x86_64
|
||||
*.hex
|
||||
|
||||
# ctags
|
||||
tags
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
-- Copyright (c) 2020-2021 hoob3rt
|
||||
-- MIT license, see LICENSE for more details.
|
||||
|
||||
local function mode()
|
||||
local mode_map = {
|
||||
['n'] = 'NORMAL',
|
||||
['no'] = 'O-PENDING',
|
||||
|
@ -33,12 +32,10 @@ local function mode()
|
|||
['!'] = 'SHELL',
|
||||
['t'] = 'TERMINAL',
|
||||
}
|
||||
local function get_mode()
|
||||
local function mode()
|
||||
local mode_code = vim.api.nvim_get_mode().mode
|
||||
if mode_map[mode_code] == nil then return mode_code end
|
||||
return mode_map[mode_code]
|
||||
end
|
||||
return get_mode()
|
||||
end
|
||||
|
||||
return mode
|
||||
|
|
|
@ -89,7 +89,7 @@ function M.create_component_highlight_group(color , highlight_tag, options)
|
|||
local fg = (color.fg or default_color_table.fg)
|
||||
-- Check if it's same as normal mode if it is no need to create aditional highlight
|
||||
if mode ~= 'normal' then
|
||||
if bg ~= normal_hl.bg and fg ~= normal_hl.fg then
|
||||
if bg ~= normal_hl.bg or fg ~= normal_hl.fg then
|
||||
highlight(table.concat(highlight_group_name, '_'), fg, bg, color.gui)
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue