mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
fix(dashboard): minimum one pane even when it doesn't fit the screen. Fixes #104
This commit is contained in:
parent
68fcc25802
commit
be8feef4ab
1 changed files with 2 additions and 1 deletions
|
@ -541,7 +541,8 @@ end
|
|||
-- Layout in panes
|
||||
function D:layout()
|
||||
self:trace("layout")
|
||||
local max_panes = math.floor((self._size.width + self.opts.pane_gap) / (self.opts.width + self.opts.pane_gap))
|
||||
local max_panes =
|
||||
math.max(1, math.floor((self._size.width + self.opts.pane_gap) / (self.opts.width + self.opts.pane_gap)))
|
||||
self.panes = {} ---@type snacks.dashboard.Item[][]
|
||||
for _, item in ipairs(self.items) do
|
||||
local pane = item.pane or 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue