mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-15 23:13:51 -05:00
fix highlighting separator when component group is skipped due to expanding components (ref c9263d9)
This commit is contained in:
@@ -507,6 +507,22 @@ function! s:suite.custom_type_notfound()
|
||||
\ [[['readonly', 'filename', 'modified']], [[0, 0, 0]], ['0', '1']])
|
||||
endfunction
|
||||
|
||||
function! s:suite.duplicated_string()
|
||||
function! Custom()
|
||||
return 'custom'
|
||||
endfunction
|
||||
function! Modified()
|
||||
return ''
|
||||
endfunction
|
||||
let g:lightline = { 'component_expand': { 'custom': 'Custom', 'modified': 'Modified' } }
|
||||
call lightline#init()
|
||||
call s:assert.equals(s:expand([['filename'], ['custom', 'custom'], ['modified']]),
|
||||
\ [[['filename'], ['custom', 'custom'], []], [[0], [1, 1], []], ['0', '1', '2', '3']])
|
||||
call s:assert.equals(s:expand([['filename', 'custom', 'custom', 'modified']]),
|
||||
\ [[['filename', 'custom', 'custom']], [[0, 1, 1]], ['0', '1']])
|
||||
delfunction Custom
|
||||
endfunction
|
||||
|
||||
function! s:suite.duplicated_left_nil()
|
||||
function! Custom()
|
||||
return [ [], ['y0', 'y1'], ['z0', 'z1'] ]
|
||||
|
||||
Reference in New Issue
Block a user