fix: infinite margin on initialization (#362)

This commit is contained in:
christoph-heinrich
2023-01-30 14:41:05 +01:00
committed by GitHub
parent b9cc1ccc3c
commit fd54373be8

View File

@@ -414,6 +414,8 @@ end
-- Notifies other scripts such as console about where the unoccupied parts of the screen are.
function update_margins()
if display.height == 0 then return end
-- margins are normalized to window size
local timeline, top_bar, controls = Elements.timeline, Elements.top_bar, Elements.controls
local bottom_y = controls and controls.enabled and controls.ay or timeline.ay