From 70ca735af008b413a611420ca34d38fc4d5f6088 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 28 Jan 2016 09:49:09 +0100 Subject: [PATCH] When calling :AirlineRefresh, also update branch name fixes #584 --- plugin/airline.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 204df99..f849d68 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -102,10 +102,16 @@ function! s:airline_theme(...) endif endfunction +function! s:airline_refresh() + unlet! b:airline_head + call airline#load_theme() + call airline#update_statusline() +endfunction + command! -bar -nargs=? -complete=customlist,get_airline_themes AirlineTheme call airline_theme() command! -bar AirlineToggleWhitespace call airline#extensions#whitespace#toggle() command! -bar AirlineToggle call s:airline_toggle() -command! -bar AirlineRefresh call airline#load_theme() | call airline#update_statusline() +command! -bar AirlineRefresh ccall s:airline_refresh() call airline#init#bootstrap() call s:airline_toggle()