summary refs log tree commit diff
path: root/clients/cli/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'clients/cli/common.c')
-rw-r--r--clients/cli/common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c
index 4d89c3f8..27477166 100644
--- a/clients/cli/common.c
+++ b/clients/cli/common.c
@@ -1383,8 +1383,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 */