From 5e1675dc6e828dba086fd8bf6c6ac6bb6ea5d4d3 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sat, 6 Jul 2013 20:53:32 +0000 Subject: [PATCH] minor refactoring, rename method for consistency --- plugin/airline.vim | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 1b97129..6386105 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -116,16 +116,14 @@ function! s:update_statusline(active) let sl = l:mode_color let sl.= a:active - \ ? '%{AirlineUpdateHighlight()} '.g:airline_section_a.' %{g:airline_paste_detection && &paste ? g:airline_paste_symbol." " : ""}'.l:mode_sep_color + \ ? '%{airline#update_highlight()} '.g:airline_section_a.' %{g:airline_paste_detection && &paste ? g:airline_paste_symbol." " : ""}' \ : ' %#Al9#' - let sl.='%{g:airline_left_sep}'.l:info_color + let sl.=l:mode_sep_color.'%{g:airline_left_sep}'.l:info_color let sl.=' '.g:airline_section_b.' ' let sl.=l:info_sep_color.g:airline_left_sep 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 + let sl.=l:status_color."%<%=".l:file_flag_color."%{&ro ? g:airline_readonly_symbol : ''}%q%{&previewwindow ? '[preview]' : ''}".l:status_color let sl.=' '.g:airline_section_x.' ' let sl.=l:info_sep_color.g:airline_right_sep.l:info_color let sl.=' '.g:airline_section_y.' ' @@ -136,7 +134,7 @@ endfunction let s:lastmode = [] let g:airline_current_mode_text = '' -function! AirlineUpdateHighlight() +function! airline#update_highlight() let l:m = mode() if l:m ==# "i" || l:m ==# "R" let l:mode = ['insert']