From 988e2b986c27bbb94cc3b15840634369a62ab94c Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Sun, 7 Jul 2013 04:18:40 +0000 Subject: [PATCH] fixes #11. comparing of arrays not working as expected. --- plugin/airline.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 63861057..1faa70b2 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -132,7 +132,7 @@ function! s:update_statusline(active) call setwinvar(winnr(), '&statusline', sl) endfunction -let s:lastmode = [] +let s:lastmode = '' let g:airline_current_mode_text = '' function! airline#update_highlight() let l:m = mode() @@ -151,9 +151,10 @@ function! airline#update_highlight() call add(l:mode, 'paste') endif - if s:lastmode != l:mode + let mode_string = join(l:mode) + if s:lastmode != mode_string call highlight(l:mode) - let s:lastmode = l:mode + let s:lastmode = mode_string endif let g:airline_current_mode_text = get(g:airline_mode_map, l:m, l:m)