summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-03-22 07:24:05 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-03-22 07:24:05 (GMT)
commitd6990d221b0528fb874561201e9a374bc0b8ac0f (patch)
tree2b52f3d225a53db04835a6d87a4d751cd6e656f6 /Modules
parente46487b1331d50faffce480a4060bed1c4e634ae (diff)
downloadcpython-d6990d221b0528fb874561201e9a374bc0b8ac0f.zip
cpython-d6990d221b0528fb874561201e9a374bc0b8ac0f.tar.gz
cpython-d6990d221b0528fb874561201e9a374bc0b8ac0f.tar.bz2
Issue #24266: Cancel history search mode with Ctrl+C in Readline 7
Diffstat (limited to 'Modules')
-rw-r--r--Modules/readline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 1fee935..4013003 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -1140,6 +1140,9 @@ readline_until_enter_or_signal(const char *prompt, int *signal)
#endif
if (s < 0) {
rl_free_line_state();
+#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0700
+ rl_callback_sigcleanup();
+#endif
rl_cleanup_after_signal();
rl_callback_handler_remove();
*signal = 1;