From 10789fae1f0b1471ee33bd6599014c7fd0bd54f7 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Tue, 29 Oct 2024 19:14:26 +0100 Subject: [PATCH] Revert "console.lua: fix the max log lines calculation" This reverts commit 5e65999eb26b92bb10aa1ed2f88a633f77442e25. This was wrong because an empty line doesn't occupy as much height as a filled line. But update the comment so it is not unclear like before why 1.5 is subtracted. --- player/lua/console.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/player/lua/console.lua b/player/lua/console.lua index e4cd5c37df..d3724af427 100644 --- a/player/lua/console.lua +++ b/player/lua/console.lua @@ -278,9 +278,9 @@ local function calculate_max_log_lines() return math.floor(select(2, get_scaled_osd_dimensions()) * (1 - global_margins.t - global_margins.b) / opts.font_size - -- Subtract 1 for the input line and 1 for the newline - -- between the log and the input line. - - 2) + -- Subtract 1 for the input line and 0.5 for the empty + -- line between the log and the input line. + - 1.5) end -- Takes a list of strings, a max width in characters and