mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-01 21:17:42 -05:00
InputText: fixed a bug (regression in 1.91.2) where modifying text buffer within a callback would sometimes prevents further appending to the buffer. (#7925)
There's a confusion between TextA.Size and CurLenA we should be merging them.
Amend 19accb14a
This commit is contained in:
@@ -1111,7 +1111,7 @@ struct IMGUI_API ImGuiInputTextState
|
||||
ImStbTexteditState* Stb; // State for stb_textedit.h
|
||||
ImGuiID ID; // widget id owning the text state
|
||||
int CurLenA; // UTF-8 length of the string in TextA (in bytes)
|
||||
ImVector<char> TextA; // main UTF8 buffer.
|
||||
ImVector<char> TextA; // main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of course >= CurLenA + 1).
|
||||
ImVector<char> InitialTextA; // value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, unaltered)
|
||||
ImVector<char> CallbackTextBackup; // temporary storage for callback to support automatic reconcile of undo-stack
|
||||
int BufCapacityA; // end-user buffer capacity
|
||||
|
||||
Reference in New Issue
Block a user