mirror of
https://github.com/amix/vimrc
synced 2025-07-13 14:55:01 +08:00
Updated plugins
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
" Filename: autoload/lightline.vim
|
||||
" Author: itchyny
|
||||
" License: MIT License
|
||||
" Last Change: 2018/11/24 12:00:00.
|
||||
" Last Change: 2019/08/20 14:00:00.
|
||||
" =============================================================================
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
@ -11,6 +11,7 @@ set cpo&vim
|
||||
let s:_ = 1 " 1: uninitialized, 2: disabled
|
||||
|
||||
function! lightline#update() abort
|
||||
if &buftype ==# 'popup' | return | endif
|
||||
if s:_
|
||||
if s:_ == 2 | return | endif
|
||||
call lightline#init()
|
||||
@ -20,7 +21,7 @@ function! lightline#update() abort
|
||||
return
|
||||
endif
|
||||
let w = winnr()
|
||||
let s = winnr('$') == 1 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)]
|
||||
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])
|
||||
call setwinvar(n, 'lightline', n!=w)
|
||||
@ -45,7 +46,10 @@ function! lightline#enable() abort
|
||||
call lightline#update()
|
||||
augroup lightline
|
||||
autocmd!
|
||||
autocmd WinEnter,BufWinEnter,FileType,SessionLoadPost * call lightline#update()
|
||||
autocmd WinEnter,BufEnter,SessionLoadPost * call lightline#update()
|
||||
if !has('patch-8.1.1715')
|
||||
autocmd FileType qf call lightline#update()
|
||||
endif
|
||||
autocmd SessionLoadPost * call lightline#highlight()
|
||||
autocmd ColorScheme * if !has('vim_starting') || expand('<amatch>') !=# 'macvim'
|
||||
\ | call lightline#update() | call lightline#highlight() | endif
|
||||
|
Reference in New Issue
Block a user