From ec20ea06c36de70c87816305af97d3fc12c3aeb4 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Mon, 19 Aug 2013 18:17:06 +0000 Subject: [PATCH] fix autoselection of theme for certain startup configs. --- plugin/airline.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 887aa29..b47653a 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -76,8 +76,10 @@ function! s:init() call airline#extensions#load() let s:airline_theme_defined = exists('g:airline_theme') - let g:airline_theme = get(g:, 'airline_theme', 'dark') - call airline#switch_theme(g:airline_theme) + if !airline#switch_matching_theme() + let g:airline_theme = get(g:, 'airline_theme', 'dark') + call airline#switch_theme(g:airline_theme) + endif endif endfunction