Merge branch 'lite-xl:master' into lite-xl-windows-dark-theme-title-bar-support

This commit is contained in:
Nikolai Sinyov 2021-09-16 16:03:26 +03:00 committed by GitHub
commit 84d7944e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -142,7 +142,14 @@ function Node:remove_view(root, view)
local parent = self:get_parent_node(root)
local is_a = (parent.a == self)
local other = parent[is_a and "b" or "a"]
if other:get_locked_size() then
local locked_size_x, locked_size_y = other:get_locked_size()
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