InputText: minor tweak to an expression.

Primarily to make PVS Studio static analysis go silent but it is a perfectly valid suggestion.
This commit is contained in:
ocornut
2025-08-06 10:47:43 +09:00
parent d163e20f63
commit 284283615b

View File

@@ -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)