mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 21:39:54 +02:00
InputText: Fixed callback's helper DeleteChars() function when cursor is inside the deleted block. (#3454).
This commit is contained in:
@ -3620,7 +3620,7 @@ void ImGuiInputTextCallbackData::DeleteChars(int pos, int bytes_count)
|
||||
*dst++ = c;
|
||||
*dst = '\0';
|
||||
|
||||
if (CursorPos + bytes_count >= pos)
|
||||
if (CursorPos >= pos + bytes_count)
|
||||
CursorPos -= bytes_count;
|
||||
else if (CursorPos >= pos)
|
||||
CursorPos = pos;
|
||||
|
Reference in New Issue
Block a user