From e29b844f42fe5257161d8014fa0e4300035ae386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Mon, 7 Dec 2015 17:18:13 +0100 Subject: [PATCH] cli: produce new line after readline when echoing was off The new line was missing. Adding termios_new.c_lflag |= (ECHONL | ICANON); did not help. Why? Fixes: a14306c2cebed02cec73bbf18fa24ee79a66b649 --- clients/cli/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clients/cli/common.c b/clients/cli/common.c index dd0b8c58dd..427c5247fc 100644 --- a/clients/cli/common.c +++ b/clients/cli/common.c @@ -1198,8 +1198,11 @@ nmc_readline_echo (gboolean echo_on, const char *prompt_fmt, ...) g_free (prompt); /* Restore original terminal settings */ - if (!echo_on) + if (!echo_on) { tcsetattr (STDIN_FILENO, TCSADRAIN, &termios_orig); + /* New line - setting ECHONL | ICANON did not help */ + fprintf (stdout, "\n"); + } return str; }