Skip to content

Commit 63374a3

Browse files
authored
garantees that win_size won't be nil (#405) (#406)
in some cases win_size is nil, which makes the round thrown an error fixes #405
1 parent ffa8983 commit 63374a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/dapui/windows/layout.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function WindowLayout:resize(opts)
106106
self.set_area_size(self.opened_wins[1], self.area_state.size)
107107
local total_size = self:_total_size()
108108
for i, win_state in pairs(self.win_states) do
109-
local win_size = opts.reset and win_state.init_size or win_state.size
109+
local win_size = opts.reset and win_state.init_size or win_state.size or 1
110110
win_size = util.round(win_size * total_size)
111111
if win_size == 0 then
112112
win_size = 1

0 commit comments

Comments
 (0)