From 265b687703e251cfe959dd3ad323fb4bda676f0d Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Wed, 3 Jul 2013 21:20:49 +0000 Subject: [PATCH] treat bufferline as an external --- plugin/airline.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 73dca4d0..3187fb4d 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -13,6 +13,7 @@ function! s:check_defined(variable, default) endfunction call s:check_defined('g:airline_left_sep', exists('g:airline_powerline_fonts')?"":">") call s:check_defined('g:airline_right_sep', exists('g:airline_powerline_fonts')?"":"<") +call s:check_defined('g:airline_enable_bufferline', 1) call s:check_defined('g:airline_enable_fugitive', 1) call s:check_defined('g:airline_enable_syntastic', 1) call s:check_defined('g:airline_fugitive_prefix', exists('g:airline_powerline_fonts')?'  ':' ') @@ -84,6 +85,7 @@ function! s:is_excluded_window() endfunction function! s:update_externals() + let g:airline_externals_bufferline = g:airline_enable_bufferline && exists('g:bufferline_loaded') ? bufferline#generate_string() : "%f%m" let g:airline_externals_fugitive = g:airline_enable_fugitive && exists('g:loaded_fugitive') ? g:airline_fugitive_prefix.fugitive#head() : '' let g:airline_externals_syntastic = g:airline_enable_syntastic && exists('g:loaded_syntastic_plugin') ? '%{SyntasticStatuslineFlag()}' : '' endfunction @@ -106,7 +108,7 @@ function! s:update_statusline(active) let sl.=g:airline_externals_fugitive let sl.=' '.l:info_sep_color."%{g:airline_left_sep}" if a:active - let sl.=l:status_color.(exists('g:bufferline_loaded')?"\ %{bufferline#generate_string()}\ ":"\ %f%m\ ") + let sl.=l:status_color.' '.g:airline_externals_bufferline.' ' else let sl.=" ".bufname(winbufnr(winnr())) endif