To be more consistent, backspace always just backspaces one character instead of colour code too.

e.g. before %cd got backspaced to nothing, now it's just %c. FF%e got backspaced to FF, now it's just FF%
This commit is contained in:
UnknownShadow200 2019-10-27 23:07:01 +11:00
parent fc27a37a77
commit 80a6a62e2b

View file

@ -1047,14 +1047,6 @@ static void InputWidget_BackspaceKey(struct InputWidget* w) {
}
InputWidget_UpdateText(w);
} else if (w->text.length > 0 && w->caretPos != 0) {
int index = w->caretPos == -1 ? w->text.length - 1 : w->caretPos;
if (InputWidget_CheckCol(w, index - 1)) {
InputWidget_DeleteChar(w); /* backspace XYZ%e to XYZ */
} else if (InputWidget_CheckCol(w, index - 2)) {
InputWidget_DeleteChar(w);
InputWidget_DeleteChar(w); /* backspace XYZ%eH to XYZ */
}
InputWidget_DeleteChar(w);
InputWidget_UpdateText(w);
}