fix highlighting separator when component group is skipped due to expanding components (ref c9263d9)

This commit is contained in:
itchyny
2018-09-17 12:26:56 +09:00
parent 0b026a2b89
commit 54a3431c12
2 changed files with 22 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
" Filename: autoload/lightline.vim
" Author: itchyny
" License: MIT License
" Last Change: 2018/09/16 23:00:00.
" Last Change: 2018/09/17 12:00:00.
" =============================================================================
let s:save_cpo = &cpo
@@ -394,6 +394,11 @@ function! s:expand(components) abort
let prevtype = type
let previndex = index
endfor
for i in range(previndex + 1, max([previndex, len(a:components) - 1]))
call add(indices, string(i))
call add(components, [])
call add(expanded, [])
endfor
call add(indices, string(len(a:components)))
return [components, expanded, indices]
endfunction