Skip to content

Commit

Permalink
perf: only resize when sidebar has windows
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 1, 2023
1 parent 30b90de commit fc7b6da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/edgy/sidebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ function M:layout()
end

function M:resize()
Layout.layout(self:wins(), { vertical = self.vertical, size = self.size })
local wins = self:wins()
if #wins == 0 then
return
end
Layout.layout(wins, { vertical = self.vertical, size = self.size })
end

function M:wins()
Expand Down

0 comments on commit fc7b6da

Please sign in to comment.