From bec5d2746f2d4ca20bec32b151a0400e22091abf Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 26 May 2024 22:22:46 +0200 Subject: [PATCH] ImGui: use cached value for clamped window width Remove extraneous indirection. --- src/gameui/IConsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameui/IConsole.cpp b/src/gameui/IConsole.cpp index 1da1103f..b6c0f27b 100644 --- a/src/gameui/IConsole.cpp +++ b/src/gameui/IConsole.cpp @@ -768,7 +768,7 @@ void CConsole::DetermineAutoCompleteWindowRect(void) const float maxWindowWidth = con_autocomplete_window_width.GetFloat(); const float flWindowWidth = maxWindowWidth > 0 - ? ImMin(con_autocomplete_window_width.GetFloat(), lastItemRectSize.x) + ? ImMin(maxWindowWidth, lastItemRectSize.x) : lastItemRectSize.x; // NOTE: minimum vertical size of the window, going below this will