1
0
mirror of https://github.com/amix/vimrc synced 2025-07-12 06:05: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

@ -13,6 +13,7 @@ jobs:
strategy:
matrix:
vim:
- v8.2.1000
- v8.2.0000
- v8.1.0000
- v8.0.0000

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')

View File

@ -5,7 +5,7 @@
" Last Change: 2013/09/07 12:21:04.
" =============================================================================
let s:base03 = [ '#151513', 233 ]
let s:base02 = [ '#30302c ', 236 ]
let s:base02 = [ '#30302c', 236 ]
let s:base01 = [ '#4e4e43', 239 ]
let s:base00 = [ '#666656', 242 ]
let s:base0 = [ '#808070', 244 ]

View File

@ -5,7 +5,7 @@
" Last Change: 2015/11/02 08:23:27.
" =============================================================================
let s:base03 = [ '#151513', 233 ]
let s:base02 = [ '#30302c ', 236 ]
let s:base02 = [ '#30302c', 236 ]
let s:base01 = [ '#4e4e43', 239 ]
let s:base00 = [ '#666656', 242 ]
let s:base0 = [ '#808070', 244 ]

View File

@ -5,7 +5,7 @@
" Last Change: 2018/05/19
" =============================================================================
let s:base03 = [ '#151513', 233 ]
let s:base02 = [ '#30302c ', 236 ]
let s:base02 = [ '#30302c', 236 ]
let s:base01 = [ '#4e4e43', 239 ]
let s:base00 = [ '#666656', 242 ]
let s:base0 = [ '#808070', 244 ]

View File

@ -5,8 +5,8 @@
" Last Change: 2015/11/30 08:37:43.
" =============================================================================
let s:base03 = [ '#242424', 235 ]
let s:base023 = [ '#353535 ', 236 ]
let s:base02 = [ '#444444 ', 238 ]
let s:base023 = [ '#353535', 236 ]
let s:base02 = [ '#444444', 238 ]
let s:base01 = [ '#585858', 240 ]
let s:base00 = [ '#666666', 242 ]
let s:base0 = [ '#808080', 244 ]

View File

@ -2,7 +2,7 @@
" Filename: autoload/lightline/colortable.vim
" Author: itchyny
" License: MIT License
" Last Change: 2015/03/29 06:21:39.
" Last Change: 2020/06/19 11:07:13.
" =============================================================================
let s:save_cpo = &cpo
@ -38,5 +38,15 @@ function! lightline#colortable#gui2cui(rgb, fallback) abort
return rgb[0] + rgb[1] + rgb[2]
endfunction
function! lightline#colortable#gui2cui_palette(palette) abort
for u in values(a:palette)
for v in values(u)
for w in v
let [w[2], w[3]] = [lightline#colortable#gui2cui(w[0], w[2]), lightline#colortable#gui2cui(w[1], w[3])]
endfor
endfor
endfor
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@ -0,0 +1,23 @@
if !has("patch-8.2.0996")
finish
endif
let s:suite = themis#suite('autocmd')
let s:assert = themis#helper('assert')
function! s:suite.before_each()
let g:lightline = {}
call lightline#init()
tabnew
tabonly
endfunction
function! s:suite.doautoall()
tabnew
tabnew
tabprevious
doautoall WinEnter
let statusline = getwinvar(1, '&statusline')
call s:assert.match(statusline, 'lightline')
call s:assert.match(statusline, '_active_')
endfunction