mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
reload colors when tomorrow theme changes
This commit is contained in:
@@ -29,6 +29,11 @@ function! airline#exec_highlight(group, colors)
|
||||
\ colors[4] != '' ? 'term='.colors[4] : '')
|
||||
endfunction
|
||||
|
||||
function! airline#reload_highlight()
|
||||
call airline#highlight(['inactive'])
|
||||
call airline#highlight(['normal'])
|
||||
endfunction
|
||||
|
||||
function! airline#load_theme(name)
|
||||
let g:airline_theme = a:name
|
||||
let inactive_colors = g:airline#themes#{g:airline_theme}#inactive "also lazy loads the theme
|
||||
|
||||
@@ -36,5 +36,5 @@ endfunction
|
||||
call s:generate()
|
||||
augroup airline_tomorrow
|
||||
autocmd!
|
||||
autocmd ColorScheme * call <sid>generate()
|
||||
autocmd ColorScheme * call <sid>generate() | call airline#reload_highlight()
|
||||
augroup END
|
||||
|
||||
Reference in New Issue
Block a user