InputText: Fixed not returning true when buffer is cleared by ImGuiInputTextFlags_EscapeClearsAll. (#5688, #2620)

This commit is contained in:
ocornut
2023-06-21 14:20:13 +02:00
parent cb5542bce5
commit 94c46d7486
3 changed files with 3 additions and 1 deletions

View File

@ -4573,6 +4573,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
// Clear input
apply_new_text = "";
apply_new_text_length = 0;
value_changed |= (buf[0] != 0);
STB_TEXTEDIT_CHARTYPE empty_string;
stb_textedit_replace(state, &state->Stb, &empty_string, 0);
}