fix: erase on DEL key in the vna shell

This commit is contained in:
TT 2020-02-23 08:20:01 +09:00
parent 8e8bc6924e
commit 1b62741a3d

2
main.c
View file

@ -2090,7 +2090,7 @@ static int VNAShell_readLine(char *line, int max_size){
if (streamRead(shell_stream, &c, 1) == 0)
return 0;
// Backspace
if (c == 8) {
if (c == 8 || c == 0x7f) {
if (ptr != line) {
static const char backspace[] = {0x08,0x20,0x08,0x00};
shell_printf(shell_stream, backspace);