summaryrefslogtreecommitdiff
path: root/client/mysql.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysql.cc')
-rw-r--r--client/mysql.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 86ee22e5e6a..7329f2298ab 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1378,9 +1378,11 @@ sig_handler handle_sigint(int sig)
if (!executing_query)
{
tee_fprintf(stdout, "Ctrl-C\n");
+#ifdef HAVE_READLINE
rl_on_new_line(); // Regenerate the prompt on a newline
rl_replace_line("", 0); // Clear the previous text
rl_redisplay();
+#endif
return;
}