mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-14 06:23:51 -05:00
fix highlight links on resetting highlights (ref: Vim 8.2.1703 213da551) (close #512)
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/09/05 20:57:51.
|
" Last Change: 2020/09/25 10:56:16.
|
||||||
" =============================================================================
|
" =============================================================================
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
@@ -290,6 +290,7 @@ function! lightline#highlight(...) abort
|
|||||||
endfor
|
endfor
|
||||||
exec printf('hi LightlineMiddle_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s %s', mode, ms[0], ms[1], ms[2], ms[3], s:term(ms))
|
exec printf('hi LightlineMiddle_%s guifg=%s guibg=%s ctermfg=%s ctermbg=%s %s', mode, ms[0], ms[1], ms[2], ms[3], s:term(ms))
|
||||||
endfor
|
endfor
|
||||||
|
if !a:0 | let s:mode = '' | endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:subseparator(components, subseparator, expanded) abort
|
function! s:subseparator(components, subseparator, expanded) abort
|
||||||
|
|||||||
@@ -141,3 +141,17 @@ function! s:suite.component_type()
|
|||||||
endfor
|
endfor
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:suite.hi_clear()
|
||||||
|
call lightline#link()
|
||||||
|
colorscheme default
|
||||||
|
call lightline#link()
|
||||||
|
call s:assert.match(s:hi('LightlineLeft_active_0'), 'LightlineLeft_normal_0')
|
||||||
|
call s:assert.match(s:hi('LightlineLeft_active_1'), 'LightlineLeft_normal_1')
|
||||||
|
call s:assert.match(s:hi('LightlineLeft_active_2'), 'E411: highlight group not found\|cleared')
|
||||||
|
call s:assert.match(s:hi('LightlineRight_active_0'), 'LightlineRight_normal_0')
|
||||||
|
call s:assert.match(s:hi('LightlineRight_active_1'), 'LightlineRight_normal_1')
|
||||||
|
call s:assert.match(s:hi('LightlineRight_active_2'), 'LightlineRight_normal_2')
|
||||||
|
call s:assert.match(s:hi('LightlineRight_active_3'), 'E411: highlight group not found\|cleared')
|
||||||
|
call s:assert.match(s:hi('LightlineMiddle_active'), 'LightlineMiddle_normal')
|
||||||
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user