define highlighting group, if it not exists

previously, it could have been skipped, if the old highlighting
attribute was the same as the current one. However, if the group does
not exist, it should still be defined

closes #1404
This commit is contained in:
Christian Brabandt 2017-02-20 21:08:38 +01:00
parent 69b132a6f4
commit f1574c4e0a
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -73,7 +73,7 @@ function! airline#highlighter#exec(group, colors)
call add(colors, '')
endif
let colors = s:CheckDefined(colors)
if old_hi != colors
if old_hi != colors || !hlexists(a:group)
let cmd = printf('hi %s %s %s %s %s %s %s %s',
\ a:group, s:Get(colors, 0, 'guifg=', ''), s:Get(colors, 1, 'guibg=', ''),
\ s:Get(colors, 2, 'ctermfg=', ''), s:Get(colors, 3, 'ctermbg=', ''),