From af330f6a47e974cc5cebb08d4804ca3ad2700447 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sun, 6 Oct 2013 09:01:01 -0400 Subject: [PATCH] add AirlineRefresh command. --- doc/airline.txt | 5 ++++- plugin/airline.vim | 1 + t/commands.vim | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/airline.txt b/doc/airline.txt index bfc5eea..8277501 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -136,7 +136,10 @@ COMMANDS *airline-commands* Toggles whitespace detection. :AirlineToggle *:AirlineToggle* - Toggles between the standard 'statusline' + Toggles between the standard 'statusline' and airline. + +:AirlineRefresh *:AirlineRefresh* + Refreshes all highlight groups. ============================================================================== CUSTOMIZATION *airline-customization* diff --git a/plugin/airline.vim b/plugin/airline.vim index d0eec0f..1292c96 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -98,6 +98,7 @@ endfunction command! -nargs=? -complete=customlist,get_airline_themes AirlineTheme call airline_theme() command! AirlineToggleWhitespace call airline#extensions#whitespace#toggle() command! AirlineToggle call airline_toggle() +command! AirlineRefresh call airline#load_theme() call airline_toggle() diff --git a/t/commands.vim b/t/commands.vim index 98a9bfd..b56b881 100644 --- a/t/commands.vim +++ b/t/commands.vim @@ -25,5 +25,9 @@ describe 'commands' execute 'AirlineTheme dark' Expect g:airline_theme == 'dark' end + + it 'should have a refresh command' + Expect exists(':AirlineRefresh') to_be_true + end end