From a2106396bc6cb3a4768158fdfffcbd2e336c261c Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Sun, 27 Oct 2024 21:57:49 +0100 Subject: [PATCH] console.lua: fix the clicked line calculation e00d8dcb03 factored hidpi-scale in get_scaled_osd_dimensions(), so max_lines was dividing by it a second time. --- player/lua/console.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/player/lua/console.lua b/player/lua/console.lua index 6bb5436be4..0aa8ebc89d 100644 --- a/player/lua/console.lua +++ b/player/lua/console.lua @@ -814,8 +814,7 @@ local function determine_hovered_item() y = y - global_margins.t * height -- Calculate how many lines could be printed without decreasing them for -- the input line and OSC. - local max_lines = height / mp.get_property_native('display-hidpi-scale', 1) - / opts.font_size + local max_lines = height / opts.font_size local clicked_line = math.floor(y / height * max_lines + .5) local offset = first_match_to_print - 1