summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2015-05-28 14:20:31 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-05-30 13:38:17 +0300
commit100004eeaf6c24f6c1b6e009ea60c991e29a8692 (patch)
tree56cf12aeee650f47a670877cca5890447c8e42a1
parent6a664cb11484a5ccdb0163c9628d56d5039db7c6 (diff)
downloadmicropython-100004eeaf6c24f6c1b6e009ea60c991e29a8692.tar.gz
micropython-100004eeaf6c24f6c1b6e009ea60c991e29a8692.zip
unix: Print an extra newline to the output on ctrl-D
This assures the terminal prints it's prompt on a fresh line instead of appending it to the uPy prompt after exit.
-rw-r--r--unix/input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/unix/input.c b/unix/input.c
index d41487c7ef..9baa342b94 100644
--- a/unix/input.c
+++ b/unix/input.c
@@ -52,6 +52,7 @@ char *prompt(char *p) {
vstr_clear(&vstr);
if (ret == CHAR_CTRL_D) {
// EOF
+ printf("\n");
return NULL;
} else {
printf("\n");