From 4372d949ba7efba5922e39e405fdb169bc20a4d6 Mon Sep 17 00:00:00 2001 From: itchyny Date: Tue, 17 Sep 2013 12:02:39 +0900 Subject: [PATCH] improve type assertion in s:expand() --- autoload/lightline.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index 1fa5242..b74ae8e 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -3,7 +3,7 @@ " Version: 0.0 " Author: itchyny " License: MIT License -" Last Change: 2013/09/17 10:52:18. +" Last Change: 2013/09/17 12:02:27. " ============================================================================= let s:save_cpo = &cpo @@ -224,7 +224,7 @@ function! s:expand(x) try let r = exists('*'.e[a:x[i][j]]) ? eval(e[a:x[i][j]] . '()') : '' if type(r) == 1 && r == '' | continue | endif - let s = type(r) == 1 ? [[], [r], []] : r + let s = type(r) == 1 ? [[], [r], []] : type(r) == 3 ? r : [[], [string(r)], []] if len(s) < 3 | call extend(s, [[], [], []]) | endif unlet r catch