Fixed backspacing text input so that it reads the char backspaced correctly.

md1702
vk7js 2022-09-05 21:35:42 +10:00 zatwierdzone przez Silvano Seva
rodzic 11132e4949
commit a1d782b16c
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -1053,12 +1053,15 @@ static void _ui_textInputConfirm(char *buf)
static void _ui_textInputDel(char *buf)
{
// announce the char about to be backspaced.
if(buf[ui_state.input_position])
vp_announceInputChar(buf[ui_state.input_position]);
buf[ui_state.input_position] = '\0';
// Move back input cursor
if(ui_state.input_position > 0)
{
ui_state.input_position--;
vp_announceInputChar(buf[ui_state.input_position]);
// If we deleted the initial character, reset starting condition
}
else