From 5481848e27fdd4fc859def9841a0283665531a46 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 13 Sep 2020 17:12:29 -0400 Subject: fixed some paging bugs, added fault handlers and new programs --- src/user/knob/user.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/user/knob/user.c') diff --git a/src/user/knob/user.c b/src/user/knob/user.c index 4ef3321..c84977c 100644 --- a/src/user/knob/user.c +++ b/src/user/knob/user.c @@ -165,16 +165,20 @@ uint32_t ask_user_line_sz(char *sz, uint32_t max_length) { goto replace; if (key & 0x80) goto replace;//TODO + if (key == '\b') { + if (i) { + --i; + _log_string("\b"); + } + goto replace; + } log_buf[0] = key; _log_string(log_buf); - if (key == '\b') - i -= i ? 2 : 1; - else if (key == '\n') + if (key == '\n') break; - else - sz[i] = key; + sz[i] = key; } sz[i] = '\0'; -- cgit v1.2.3