From b410186031756d45f0626dd3a497a5282b1ff63b Mon Sep 17 00:00:00 2001 From: itchyny Date: Thu, 22 Aug 2013 04:45:31 +0900 Subject: [PATCH] use negative logic for lightline#statusline --- autoload/lightline.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index 3a7cca7..edda9bf 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -5,12 +5,12 @@ let s:_ = 1 function! lightline#update(...) if s:_ | call lightline#init() | endif - let s = lightline#statusline(0) + let s = lightline#statusline(1) for nr in filter(range(1, winnr('$')), 'v:val != winnr()') call setwinvar(nr, '&statusline', s) call setwinvar(nr, 'lightline', 1) endfor - let s = lightline#statusline(1) + let s = lightline#statusline(0) call setwinvar(winnr(), '&statusline', s) call setwinvar(winnr(), 'lightline', 0) endfunction @@ -126,9 +126,9 @@ function! lightline#subseparator(x, y, s) endif endfunction -function! lightline#statusline(active) +function! lightline#statusline(inactive) let _ = '' - let mode = a:active ? 'active' : 'inactive' + let mode = a:inactive ? 'inactive' : 'active' let left = has_key(g:lightline, mode) ? g:lightline[mode].left : g:lightline.active.left let right = has_key(g:lightline, mode) ? g:lightline[mode].right : g:lightline.active.right for i in range(len(left))