diff --git a/lua/lualine/components/special/eval_func_component.lua b/lua/lualine/components/special/eval_func_component.lua index 7c82ad0..39befda 100644 --- a/lua/lualine/components/special/eval_func_component.lua +++ b/lua/lualine/components/special/eval_func_component.lua @@ -25,7 +25,7 @@ end EvalFuncComponent.vim_function = function(name) -- vim function component - local ok, return_val = pcall(vim.fn[name]) + local ok, return_val = pcall(vim.api.nvim_call_function, name, {}) if not ok then return '' end -- function call failed ok, return_val = pcall(tostring, return_val) return ok and return_val or ''