From 1f44ca0ccf7a61e82fe151377b88e4387d66bf58 Mon Sep 17 00:00:00 2001 From: itchyny Date: Sun, 24 Apr 2016 21:49:54 +0900 Subject: [PATCH] update s:term --- autoload/lightline.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index 1681fd4..ca2f1a4 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2016/04/23 13:49:04. +" Last Change: 2016/04/24 21:48:18. " ============================================================================= let s:save_cpo = &cpo @@ -242,8 +242,8 @@ function! lightline#link(...) abort return '' endfunction -function! s:term(l) 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] : '' +function! s:term(p) abort + return get(a:p, 4) !=# '' ? 'term='.a:p[4].' cterm='.a:p[4].' gui='.a:p[4] : '' endfunction if exists('*uniq')