From 7d67623d15b6514f8fb4f2b1a4e51a0d5ee5aca1 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 8 Feb 2024 15:46:17 +0100 Subject: [PATCH] InputText: Internal: ReloadUserBufXXX functions don't override revert value. (#2890) fix accidental comment. --- imgui_widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 6fcf0b73..2df1c9f3 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -4201,7 +4201,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ // From the moment we focused we are normally ignoring the content of 'buf' (unless we are in read-only mode) const int buf_len = (int)strlen(buf); - //if (!init_reload_from_user_buf) + if (!init_reload_from_user_buf) { // Take a copy of the initial buffer value. state->InitialTextA.resize(buf_len + 1); // UTF-8. we use +1 to make sure that .Data is always pointing to at least an empty string.