Merge pull request #1240 from chrisbra/1226

Add User autocommand for Theme changing
This commit is contained in:
Christian Brabandt 2016-09-05 19:32:13 +02:00 committed by GitHub
commit 5eaf658b9c
2 changed files with 3 additions and 0 deletions

View File

@ -65,6 +65,8 @@ function! airline#switch_theme(name)
let w:airline_lastmode = '' let w:airline_lastmode = ''
call airline#load_theme() call airline#load_theme()
silent doautocmd User AirlineAfterTheme
" this is required to prevent clobbering the startup info message, i don't know why... " this is required to prevent clobbering the startup info message, i don't know why...
call airline#check_mode(winnr()) call airline#check_mode(winnr())
endfunction endfunction

View File

@ -168,6 +168,7 @@ Airline comes with some user-defined autocommands.
|AirlineAfterInit| after plugin is initialized, but before the statusline |AirlineAfterInit| after plugin is initialized, but before the statusline
is replaced is replaced
|AirlineAfterTheme| after theme of the statusline has been changed
|AirlineToggledOn| after airline is activated and replaced the statusline |AirlineToggledOn| after airline is activated and replaced the statusline
|AirlineToggledOff| after airline is deactivated and the statusline is |AirlineToggledOff| after airline is deactivated and the statusline is
restored to the original restored to the original