From 47425f9b4f456d5f872fc3a206061446071ff650 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sat, 6 Jul 2013 18:05:27 +0000 Subject: [PATCH] condense if statement --- plugin/airline.vim | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index ed0d6c3..10ae769 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -119,13 +119,8 @@ function! s:update_statusline(active) let sl.='%{g:airline_left_sep}'.l:info_color let sl.=' '.g:airline_section_b.' ' let sl.=l:info_sep_color.g:airline_left_sep - if a:active - let sl.=l:status_color.' '.g:airline_section_c.' ' - else - let sl.=" ".bufname(winbufnr(winnr())) - endif - let sl.="%#warningmsg#" - let sl.=g:airline_externals_syntastic + let sl.=a:active ? l:status_color.' '.g:airline_section_c.' ' : ' '.bufname(winbufnr(winnr())) + let sl.='%#warningmsg#'.g:airline_externals_syntastic let sl.=l:status_color."%<%=".l:file_flag_color."%{&ro ? g:airline_readonly_symbol : ''}" let sl.="%q%{&previewwindow?'[preview]':''}" let sl.=l:status_color