From a1d782b16cec12a6f4977663bdd813ac8efb9aec Mon Sep 17 00:00:00 2001 From: vk7js <58905135+vk7js@users.noreply.github.com> Date: Mon, 5 Sep 2022 21:35:42 +1000 Subject: [PATCH] Fixed backspacing text input so that it reads the char backspaced correctly. --- openrtx/src/ui/ui.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index df7f4921..2b5544da 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -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