mirror of
https://github.com/raysan5/raygui.git
synced 2026-01-26 00:59:17 -05:00
@ -2229,8 +2229,12 @@ bool GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode)
|
|||||||
// Move backward text from cursor position
|
// Move backward text from cursor position
|
||||||
for (int i = (textBoxCursorIndex - prevCodepointSize); i < textLength; i++) text[i] = text[i + prevCodepointSize];
|
for (int i = (textBoxCursorIndex - prevCodepointSize); i < textLength; i++) text[i] = text[i + prevCodepointSize];
|
||||||
|
|
||||||
textBoxCursorIndex -= codepointSize;
|
// Prevent textBoxCursorIndex from decrementing past 0
|
||||||
textLength -= codepointSize;
|
if(textBoxCursorIndex > 0)
|
||||||
|
{
|
||||||
|
textBoxCursorIndex -= codepointSize;
|
||||||
|
textLength -= codepointSize;
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure text last character is EOL
|
// Make sure text last character is EOL
|
||||||
text[textLength] = '\0';
|
text[textLength] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user