From e1680167fd663b024fcec34751994df26083c3f9 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Wed, 30 Oct 2024 15:57:37 +0100 Subject: [PATCH] console.lua: factor OSC margins before the bottom margin OSC margins are relative to the whole height before subtracting the bottom left margin. --- player/lua/console.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/player/lua/console.lua b/player/lua/console.lua index 9a5c219096..007a67b7fe 100644 --- a/player/lua/console.lua +++ b/player/lua/console.lua @@ -276,8 +276,9 @@ local function calculate_max_log_lines() select(2, mp.get_property('term-status-msg'):gsub('\\n', '')) end - return math.floor((select(2, get_scaled_osd_dimensions()) - bottom_left_margin) - * (1 - global_margins.t - global_margins.b) + return math.floor((select(2, get_scaled_osd_dimensions()) + * (1 - global_margins.t - global_margins.b) + - bottom_left_margin) / opts.font_size -- Subtract 1 for the input line and 0.5 for the empty -- line between the log and the input line.