mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
InputText: Internal renaming of some fields + final copy uses edit_state.CurLenA+1 instead of buf_size.
This commit is contained in:
@ -2959,7 +2959,8 @@ struct ExampleAppConsole
|
||||
// A better implementation would preserve the data on the current input line along with cursor position.
|
||||
if (prev_history_pos != HistoryPos)
|
||||
{
|
||||
data->CursorPos = data->SelectionStart = data->SelectionEnd = data->BufTextLen = (int)snprintf(data->Buf, (size_t)data->BufSize, "%s", (HistoryPos >= 0) ? History[HistoryPos] : "");
|
||||
int sz = (int)snprintf(data->Buf, (size_t)data->BufSize, "%s", (HistoryPos >= 0) ? History[HistoryPos] : "");
|
||||
data->CursorPos = data->SelectionStart = data->SelectionEnd = data->BufTextLen = sz;
|
||||
data->BufDirty = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user