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: a14306c2ce
This commit is contained in:
Jiří Klimeš 2015-12-07 17:18:13 +01:00
parent 229ea4547c
commit e29b844f42

View file

@ -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;
}