From 74133aa0c8ec6542c8d5598b8f317a238d600842 Mon Sep 17 00:00:00 2001 From: Andrei Menzopol Date: Tue, 30 Jan 2024 07:21:06 -0800 Subject: [PATCH] [shell] Add backspace character in ReadLine Signed-off-by: Andrei Menzopol --- src/lib/shell/MainLoopDefault.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/shell/MainLoopDefault.cpp b/src/lib/shell/MainLoopDefault.cpp index fba29a7238f161..c83fc96e4a1413 100644 --- a/src/lib/shell/MainLoopDefault.cpp +++ b/src/lib/shell/MainLoopDefault.cpp @@ -69,6 +69,7 @@ size_t ReadLine(char * buffer, size_t max) done = true; } break; + case 0x08: case 0x7F: // Do not accept backspace character (i.e. don't increment line_sz) and remove 1 additional character if it exists. if (line_sz >= 1u)