1
0
mirror of https://github.com/amix/vimrc synced 2025-07-13 14:55:01 +08:00

Updated plugins

This commit is contained in:
Amir
2020-06-21 11:50:44 -04:00
parent 1d312d3252
commit e83f5ea2e7
46 changed files with 470 additions and 152 deletions

View File

@ -2,7 +2,7 @@
" Filename: autoload/lightline.vim
" Author: itchyny
" License: MIT License
" Last Change: 2020/03/16 19:10:15.
" Last Change: 2020/06/19 11:08:46.
" =============================================================================
let s:save_cpo = &cpo
@ -11,27 +11,35 @@ set cpo&vim
let s:_ = 1 " 1: uninitialized, 2: disabled
function! lightline#update() abort
if &buftype ==# 'popup' | return | endif
if s:skip() | return | endif
if s:_
if s:_ == 2 | return | endif
call lightline#init()
call lightline#colorscheme()
endif
if !s:lightline.enable.statusline
return
if s:lightline.enable.statusline
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
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
if exists('*win_gettype')
function! s:skip() abort " Vim 8.2.0257 (00f3b4e007), 8.2.0991 (0fe937fd86), 8.2.0996 (40a019f157)
return win_gettype() ==# 'popup' || win_gettype() ==# 'autocmd'
endfunction
else
function! s:skip() abort
return &buftype ==# 'popup'
endfunction
endif
function! lightline#update_disable() abort
if !s:lightline.enable.statusline
return
if s:lightline.enable.statusline
call setwinvar(0, '&statusline', '')
endif
call setwinvar(0, '&statusline', '')
endfunction
function! lightline#enable() abort
@ -190,13 +198,7 @@ function! lightline#colorscheme() abort
let s:lightline.palette = g:lightline#colorscheme#{s:lightline.colorscheme}#palette
finally
if has('win32') && !has('gui_running') && &t_Co < 256
for u in values(s:lightline.palette)
for v in values(u)
for _ in v
let [_[2], _[3]] = [lightline#colortable#gui2cui(_[0], _[2]), lightline#colortable#gui2cui(_[1], _[3])]
endfor
endfor
endfor
call lightline#colortable#gui2cui_palette(s:lightline.palette)
endif
let s:highlight = {}
call lightline#highlight('normal')