mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 17:57:36 +08:00
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] : '')
|
||||
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
|
||||
|
|
|
@ -93,7 +93,7 @@ command! -nargs=? -complete=customlist,<sid>get_airline_themes AirlineTheme call
|
|||
|
||||
augroup airline
|
||||
autocmd!
|
||||
autocmd ColorScheme * call airline#highlight(['normal'])
|
||||
autocmd ColorScheme * call airline#reload_highlight()
|
||||
autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost *
|
||||
\ call <sid>on_window_changed()
|
||||
autocmd CursorMoved * call <sid>sync_active_winnr()
|
||||
|
|
Loading…
Reference in New Issue
Block a user