From 284283615b2fcf9d7d7d8608fdd990fc767b1791 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 6 Aug 2025 10:47:43 +0900 Subject: [PATCH] InputText: minor tweak to an expression. Primarily to make PVS Studio static analysis go silent but it is a perfectly valid suggestion. --- imgui_widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 5f595e788..cb5dade87 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -4944,7 +4944,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ { // Determine if we turn Enter into a \n character bool ctrl_enter_for_new_line = (flags & ImGuiInputTextFlags_CtrlEnterForNewLine) != 0; - if (!is_multiline || is_gamepad_validate || (ctrl_enter_for_new_line && !io.KeyCtrl) || (!ctrl_enter_for_new_line && io.KeyCtrl)) + if (!is_multiline || is_gamepad_validate || (ctrl_enter_for_new_line != io.KeyCtrl)) { validated = true; if (io.ConfigInputTextEnterKeepActive && !is_multiline)