sysparam editor: accept newline to end a line of input.
This commit is contained in:
parent
5aabd643da
commit
b79da1f1f1
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ size_t tty_readline(char *buffer, size_t buf_size, bool echo) {
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
c = getchar();
|
c = getchar();
|
||||||
if (c == '\r') {
|
if (c == '\r' || c == '\n') {
|
||||||
if (echo) putchar('\n');
|
if (echo) putchar('\n');
|
||||||
break;
|
break;
|
||||||
} else if (c == '\b' || c == 0x7f) {
|
} else if (c == '\b' || c == 0x7f) {
|
||||||
|
|
Loading…
Reference in a new issue