Skip to content

Commit

Permalink
fix(broadcast): correctly apply function to all nodes including the s…
Browse files Browse the repository at this point in the history
…tarting one
  • Loading branch information
rebelot committed Sep 6, 2022
1 parent ad52add commit 290159b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/heirline/statusline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ end
--- Broadcast a function that will be executed by every component
---@param func function
function StatusLine:broadcast(func)
func(self)
for i, c in ipairs(self) do
func(c)
c:broadcast(func)
end
end
Expand Down

0 comments on commit 290159b

Please sign in to comment.