mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
debugimgui: when using history, set the cursor position to the end of the text
This commit is contained in:
parent
6ae599f4cc
commit
59d73876fb
@ -490,9 +490,9 @@ int debug_imgui::history_set(ImGuiTextEditCallbackData* data)
|
||||
}
|
||||
|
||||
if(history_pos == view_main_console->console_history.size())
|
||||
data->BufTextLen = (int)snprintf(data->Buf, (size_t)data->BufSize, "%s", "");
|
||||
data->CursorPos = data->BufTextLen = (int)snprintf(data->Buf, (size_t)data->BufSize, "%s", "");
|
||||
else
|
||||
data->BufTextLen = (int)snprintf(data->Buf, (size_t)data->BufSize, "%s", view_main_console->console_history[history_pos].c_str());
|
||||
data->CursorPos = data->BufTextLen = (int)snprintf(data->Buf, (size_t)data->BufSize, "%s", view_main_console->console_history[history_pos].c_str());
|
||||
|
||||
data->BufDirty = true;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user