diff --git a/lua/lualine/components/special/functon_component.lua b/lua/lualine/components/special/functon_component.lua index 820d566..e18f26f 100644 --- a/lua/lualine/components/special/functon_component.lua +++ b/lua/lualine/components/special/functon_component.lua @@ -1,9 +1,8 @@ local FunctionComponent = require('lualine.component'):new() -FunctionComponent.new = function(self, options, child) - local new_instence = self._parent:new(options, child or FunctionComponent) - new_instence.update_status = options[1] - return new_instence +FunctionComponent.update_status = function(self) + -- 1st element in options table is the function provided by config + return self.options[1]() end return FunctionComponent