condense if statement

This commit is contained in:
Bailey Ling 2013-07-06 18:05:27 +00:00
parent 53537c121d
commit 47425f9b4f
1 changed files with 2 additions and 7 deletions

View File

@ -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