diff --git a/clients/cli/common.c b/clients/cli/common.c index c9e0bbbd43..46b426d344 100644 --- a/clients/cli/common.c +++ b/clients/cli/common.c @@ -988,8 +988,10 @@ read_again: /* If Ctrl-C was detected, complete the line */ if (nmc_seen_sigint ()) { rl_echo_signal_char (SIGINT); - rl_stuff_char ('\n'); - rl_callback_read_char (); + if (!rl_got_line) { + rl_stuff_char ('\n'); + rl_callback_read_char (); + } } /* Add string to the history */