|
|
@ -3366,7 +3366,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ |
|
|
|
bool enter_pressed = false; |
|
|
|
bool enter_pressed = false; |
|
|
|
|
|
|
|
|
|
|
|
// Select the buffer to render.
|
|
|
|
// Select the buffer to render.
|
|
|
|
const bool buf_display_from_state = ((render_cursor || render_selection || g.ActiveId == id) && !is_readonly && state && state->TextAIsValid); |
|
|
|
const bool buf_display_from_state = (render_cursor || render_selection || g.ActiveId == id) && !is_readonly && state && state->TextAIsValid; |
|
|
|
const bool is_displaying_hint = (hint != NULL && (buf_display_from_state ? state->TextA.Data : buf)[0] == 0); |
|
|
|
const bool is_displaying_hint = (hint != NULL && (buf_display_from_state ? state->TextA.Data : buf)[0] == 0); |
|
|
|
|
|
|
|
|
|
|
|
// Password pushes a temporary font with only a fallback glyph
|
|
|
|
// Password pushes a temporary font with only a fallback glyph
|
|
|
@ -3734,7 +3734,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ |
|
|
|
// without any carriage return, which would makes ImFont::RenderText() reserve too many vertices and probably crash. Avoid it altogether.
|
|
|
|
// without any carriage return, which would makes ImFont::RenderText() reserve too many vertices and probably crash. Avoid it altogether.
|
|
|
|
// Note that we only use this limit on single-line InputText(), so a pathologically large line on a InputTextMultiline() would still crash.
|
|
|
|
// Note that we only use this limit on single-line InputText(), so a pathologically large line on a InputTextMultiline() would still crash.
|
|
|
|
const int buf_display_max_length = 2 * 1024 * 1024; |
|
|
|
const int buf_display_max_length = 2 * 1024 * 1024; |
|
|
|
const char* buf_display = buf_display_from_state ? state->TextA.Data : buf; |
|
|
|
const char* buf_display = buf_display_from_state ? state->TextA.Data : buf; //-V595
|
|
|
|
const char* buf_display_end = NULL; // We have specialized paths below for setting the length
|
|
|
|
const char* buf_display_end = NULL; // We have specialized paths below for setting the length
|
|
|
|
if (is_displaying_hint) |
|
|
|
if (is_displaying_hint) |
|
|
|
{ |
|
|
|
{ |
|
|
|