mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-13 05:53:51 -05:00
use eval instead of call to evaluate the expand components to support dictionary functions (fix #183)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user