From dac7a290df6ff0c22da423dec7a1fdc6ab4f9f5d Mon Sep 17 00:00:00 2001 From: Shadman Date: Wed, 14 Apr 2021 10:07:19 +0600 Subject: [PATCH] BugFix: fix vim functions displaying nil (#177) --- lua/lualine/components/special/eval_func_component.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lualine/components/special/eval_func_component.lua b/lua/lualine/components/special/eval_func_component.lua index 9110591..6dc6a2d 100644 --- a/lua/lualine/components/special/eval_func_component.lua +++ b/lua/lualine/components/special/eval_func_component.lua @@ -3,7 +3,9 @@ local EvalFuncComponent = require('lualine.component'):new() EvalFuncComponent.update_status = function(self) local component = self.options[1] 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 end