From 718eb60e9850491db5fc581d20cede4ce15911b7 Mon Sep 17 00:00:00 2001 From: itchyny Date: Sun, 4 Sep 2016 13:06:49 +0900 Subject: [PATCH] use eval instead of call to evaluate the expand components to support dictionary functions (fix #183) --- autoload/lightline.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index 280c12d..14d1d2a 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/08/21 11:23:58. +" Last Change: 2016/09/04 13:01:40. " ============================================================================= let s:save_cpo = &cpo @@ -325,7 +325,7 @@ endfunction function! s:evaluate_expand(component) abort try - let result = call(a:component, []) + let result = eval(a:component . '()') if type(result) == 1 && result ==# '' return [] endif