From 66bfff2e26c20c8d8b4e3325da4ac0dabc9c0b04 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Wed, 15 Sep 2021 17:30:16 +0200 Subject: [PATCH] Fix wrong locked sibling check Previously if the split type was "hsplit", but `locked_size_x` was falsy, `locked_size_y` was wrongly used. --- data/core/rootview.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/data/core/rootview.lua b/data/core/rootview.lua index bd0d7423..0856a619 100644 --- a/data/core/rootview.lua +++ b/data/core/rootview.lua @@ -143,8 +143,13 @@ function Node:remove_view(root, view) local is_a = (parent.a == self) local other = parent[is_a and "b" or "a"] local locked_size_x, locked_size_y = other:get_locked_size() - if self.is_primary_node - or (parent.type == "hsplit" and locked_size_x or locked_size_y) then + local locked_size + if parent.type == "hsplit" then + locked_size = locked_size_x + else + locked_size = locked_size_y + end + if self.is_primary_node or locked_size then self.views = {} self:add_view(EmptyView()) else