summary refs log tree commit diff
path: root/clients/cli/common.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-07-12 17:57:30 +0200
committerMichael Biebl <biebl@debian.org>2017-07-12 17:57:30 +0200
commitb9f0451fa35393ceedf6d9d20b78c43578ebea5d (patch)
tree417afcdd717020ad44e25fadee4b89de23316e83 /clients/cli/common.c
parentc333f062ddcba9b35330647bf6cbd0a07f2d786e (diff)
New upstream version 1.8.2 upstream/1.8.2
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 */