mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-03 23:08:19 +02:00
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:
parent
229ea4547c
commit
e29b844f42
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue