update s:term

This commit is contained in:
itchyny
2016-04-24 21:49:54 +09:00
parent cc52241a87
commit 1f44ca0ccf

View File

@@ -2,7 +2,7 @@
" Filename: autoload/lightline.vim " Filename: autoload/lightline.vim
" Author: itchyny " Author: itchyny
" License: MIT License " License: MIT License
" Last Change: 2016/04/23 13:49:04. " Last Change: 2016/04/24 21:48:18.
" ============================================================================= " =============================================================================
let s:save_cpo = &cpo let s:save_cpo = &cpo
@@ -242,8 +242,8 @@ function! lightline#link(...) abort
return '' return ''
endfunction endfunction
function! s:term(l) abort function! s:term(p) abort
return len(a:l) == 5 && type(a:l[4]) == 1 && strlen(a:l[4]) ? 'term='.a:l[4].' cterm='.a:l[4].' gui='.a:l[4] : '' return get(a:p, 4) !=# '' ? 'term='.a:p[4].' cterm='.a:p[4].' gui='.a:p[4] : ''
endfunction endfunction
if exists('*uniq') if exists('*uniq')