mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Console: Handle ^H as backspace
Currently only ASCII DEL (key code 127) is handled as backspace, but some terminal emulators are sending ^H which is ASCII BS (key code 8). Looks like we can safely treat both in the same matter.
This commit is contained in:
1 parent
f1e5b7e31a
commit
16edc6b421
1 file changed
+1
-1
+1
-1
@@ -169,7 +169,7 @@ void cmd_edit(void) __banked
|
||||
} else { // An unknown or not yet complete Escape sequence: wait
|
||||
continue;
|
||||
}
|
||||
} else if (sbuf[l] == 127) { // Backspace
|
||||
} else if (sbuf[l] == 127 || sbuf[l] == 8) { // Backspace DEL or BS/^H
|
||||
if (cursor > 0) {
|
||||
write_char('\010');
|
||||
for (uint8_t i = cursor; i < cmd_line_len; i++)
|
||||
|
||||
Reference in new issue
Block a user