From 6f80179a1d45753e7065ea7f79360e8e30e5d115 Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 23 Feb 2019 17:04:54 +0100 Subject: [PATCH] InputText: Fixed deactivated but-last-active InputText instance holding on displaying the last active version of the text and not reflecting change in the source. Fix/amend 2e9a175. [+test] --- imgui_widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 26eb5c24..8ad51a28 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -3647,7 +3647,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 const int buf_display_max_length = 2 * 1024 * 1024; // Select which buffer we are going to display. We set buf to NULL to prevent accidental usage from now on. - const char* buf_display = (state != NULL && !is_readonly) ? state->TextA.Data : buf; + const char* buf_display = (g.ActiveId == id && state && !is_readonly) ? state->TextA.Data : buf; IM_ASSERT(buf_display); buf = NULL;