From b79da1f1f1de66f37a790b1d672f6060bee3284f Mon Sep 17 00:00:00 2001 From: Our Air Quality Date: Mon, 7 Aug 2017 22:38:05 +1000 Subject: [PATCH] sysparam editor: accept newline to end a line of input. --- examples/sysparam_editor/sysparam_editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sysparam_editor/sysparam_editor.c b/examples/sysparam_editor/sysparam_editor.c index f3f767b..29bf78e 100644 --- a/examples/sysparam_editor/sysparam_editor.c +++ b/examples/sysparam_editor/sysparam_editor.c @@ -45,7 +45,7 @@ size_t tty_readline(char *buffer, size_t buf_size, bool echo) { while (true) { c = getchar(); - if (c == '\r') { + if (c == '\r' || c == '\n') { if (echo) putchar('\n'); break; } else if (c == '\b' || c == 0x7f) {