Skip to content
5 changes: 3 additions & 2 deletions lua/dapui/windows/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ function WindowLayout:resize(opts)

self.set_area_size(self.opened_wins[1], self.area_state.size)
local total_size = self:_total_size()
for i, win_state in pairs(self.win_states) do
local win_size = opts.reset and win_state.init_size or win_state.size or 1
for i = #self.win_states, 1, -1 do
local win_state = self.win_states[i]
local win_size = opts.reset and win_state.init_size or win_state.size
win_size = util.round(win_size * total_size)
if win_size == 0 then
win_size = 1
Expand Down