BugFix: fix vim functions displaying nil (#177)
This commit is contained in:
parent
aa844a9555
commit
dac7a290df
|
@ -3,7 +3,9 @@ local EvalFuncComponent = require('lualine.component'):new()
|
||||||
EvalFuncComponent.update_status = function(self)
|
EvalFuncComponent.update_status = function(self)
|
||||||
local component = self.options[1]
|
local component = self.options[1]
|
||||||
local ok, status = pcall(EvalFuncComponent.eval_lua, component)
|
local ok, status = pcall(EvalFuncComponent.eval_lua, component)
|
||||||
if not ok then status = EvalFuncComponent.vim_function(component) end
|
if not ok or status == 'nil' then
|
||||||
|
status = EvalFuncComponent.vim_function(component)
|
||||||
|
end
|
||||||
return status
|
return status
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue