mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-10 20:43:53 -05:00
stop quick return because it is true for most users
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
" Filename: autoload/lightline.vim
|
" Filename: autoload/lightline.vim
|
||||||
" Author: itchyny
|
" Author: itchyny
|
||||||
" License: MIT License
|
" License: MIT License
|
||||||
" Last Change: 2020/06/19 07:02:24.
|
" Last Change: 2020/06/19 07:27:34.
|
||||||
" =============================================================================
|
" =============================================================================
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
@@ -17,14 +17,13 @@ function! lightline#update() abort
|
|||||||
call lightline#init()
|
call lightline#init()
|
||||||
call lightline#colorscheme()
|
call lightline#colorscheme()
|
||||||
endif
|
endif
|
||||||
if !s:lightline.enable.statusline
|
if s:lightline.enable.statusline
|
||||||
return
|
let w = winnr()
|
||||||
|
let s = winnr('$') == 1 && w > 0 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)]
|
||||||
|
for n in range(1, winnr('$'))
|
||||||
|
call setwinvar(n, '&statusline', s[n!=w])
|
||||||
|
endfor
|
||||||
endif
|
endif
|
||||||
let w = winnr()
|
|
||||||
let s = winnr('$') == 1 && w > 0 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)]
|
|
||||||
for n in range(1, winnr('$'))
|
|
||||||
call setwinvar(n, '&statusline', s[n!=w])
|
|
||||||
endfor
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if exists('*win_gettype')
|
if exists('*win_gettype')
|
||||||
@@ -38,10 +37,9 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
function! lightline#update_disable() abort
|
function! lightline#update_disable() abort
|
||||||
if !s:lightline.enable.statusline
|
if s:lightline.enable.statusline
|
||||||
return
|
call setwinvar(0, '&statusline', '')
|
||||||
endif
|
endif
|
||||||
call setwinvar(0, '&statusline', '')
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! lightline#enable() abort
|
function! lightline#enable() abort
|
||||||
|
|||||||
Reference in New Issue
Block a user