From ef60b24f632cad403f9c7de382dade8dd8f1a358 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Sat, 16 Oct 2021 02:56:01 +0200 Subject: [PATCH] Check both values returned by `Node:get_locked_size` --- data/core/commands/root.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/core/commands/root.lua b/data/core/commands/root.lua index e41c723d..49bf774a 100644 --- a/data/core/commands/root.lua +++ b/data/core/commands/root.lua @@ -112,7 +112,8 @@ for _, dir in ipairs { "left", "right", "up", "down" } do y = node.position.y + (dir == "up" and -1 or node.size.y + style.divider_size) end local node = core.root_view.root_node:get_child_overlapping_point(x, y) - if not node:get_locked_size() then + local sx, sy = node:get_locked_size() + if not sx and not sy then core.set_active_view(node.active_view) end end @@ -120,5 +121,6 @@ end command.add(function() local node = core.root_view:get_active_node() - return not node:get_locked_size() + local sx, sy = node:get_locked_size() + return not sx and not sy end, t)