about 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:58:09 +0200
committerMichael Biebl <biebl@debian.org>2017-07-12 17:58:09 +0200
commit1c106aa806930113c6773992fa4ddce13e295ead (patch)
tree2242b717e4060d33794b94d9c45f81e4007e3a3f /clients/cli/common.c
parenteb2473a843f46fae54f981c822fcace18d8f6fdf (diff)
parentb9f0451fa35393ceedf6d9d20b78c43578ebea5d (diff)
Updated version 1.8.2 from 'upstream/1.8.2'
with Debian dir 0d04ce142632bf08356d8d906289b6fc2de9e7c1
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 */