summaryrefslogtreecommitdiff
path: root/src/user/knob/user.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2020-09-13 17:12:29 -0400
committerBenji Dial <benji6283@gmail.com>2020-09-13 17:12:29 -0400
commit5481848e27fdd4fc859def9841a0283665531a46 (patch)
tree990a8df008214d85141a3bd10bd96898e64b0c37 /src/user/knob/user.c
parent1e4a254674f668839e5de273916024c16814b045 (diff)
downloadportland-os-5481848e27fdd4fc859def9841a0283665531a46.tar.gz
fixed some paging bugs, added fault handlers and new programs
Diffstat (limited to 'src/user/knob/user.c')
-rw-r--r--src/user/knob/user.c14
1 files changed, 9 insertions, 5 deletions
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';