reload colors when tomorrow theme changes
This commit is contained in:
parent
729f9e8354
commit
835f718cb6
|
@ -29,6 +29,11 @@ function! airline#exec_highlight(group, colors)
|
||||||
\ colors[4] != '' ? 'term='.colors[4] : '')
|
\ colors[4] != '' ? 'term='.colors[4] : '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! airline#reload_highlight()
|
||||||
|
call airline#highlight(['inactive'])
|
||||||
|
call airline#highlight(['normal'])
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! airline#load_theme(name)
|
function! airline#load_theme(name)
|
||||||
let g:airline_theme = a:name
|
let g:airline_theme = a:name
|
||||||
let inactive_colors = g:airline#themes#{g:airline_theme}#inactive "also lazy loads the theme
|
let inactive_colors = g:airline#themes#{g:airline_theme}#inactive "also lazy loads the theme
|
||||||
|
|
|
@ -36,5 +36,5 @@ endfunction
|
||||||
call s:generate()
|
call s:generate()
|
||||||
augroup airline_tomorrow
|
augroup airline_tomorrow
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd ColorScheme * call <sid>generate()
|
autocmd ColorScheme * call <sid>generate() | call airline#reload_highlight()
|
||||||
augroup END
|
augroup END
|
||||||
|
|
|
@ -93,7 +93,7 @@ command! -nargs=? -complete=customlist,<sid>get_airline_themes AirlineTheme call
|
||||||
|
|
||||||
augroup airline
|
augroup airline
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd ColorScheme * call airline#highlight(['normal'])
|
autocmd ColorScheme * call airline#reload_highlight()
|
||||||
autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost *
|
autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost *
|
||||||
\ call <sid>on_window_changed()
|
\ call <sid>on_window_changed()
|
||||||
autocmd CursorMoved * call <sid>sync_active_winnr()
|
autocmd CursorMoved * call <sid>sync_active_winnr()
|
||||||
|
|
Loading…
Reference in New Issue