summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-03-22 09:28:58 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-03-22 09:28:58 (GMT)
commit0b2d71bc70c32560853fa91f58dc37af8f08090c (patch)
treeaa59f2d8c0d355dd85fa9f07bf19b3558c5834e5
parent2efdc8c7c1bbd8b1b017d692c0607f4b26245e2d (diff)
parentd6990d221b0528fb874561201e9a374bc0b8ac0f (diff)
downloadcpython-0b2d71bc70c32560853fa91f58dc37af8f08090c.zip
cpython-0b2d71bc70c32560853fa91f58dc37af8f08090c.tar.gz
cpython-0b2d71bc70c32560853fa91f58dc37af8f08090c.tar.bz2
Issue #24266: Merge readline Ctrl+C handling from 3.5
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/readline.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 6dfac97..e6d69a2 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -232,6 +232,9 @@ Core and Builtins
Library
-------
+- Issue #24266: Ctrl+C during Readline history search now cancels the search
+ mode when compiled with Readline 7.
+
- Issue #26590: Implement a safe finalizer for the _socket.socket type. It now
releases the GIL to close the socket.
diff --git a/Modules/readline.c b/Modules/readline.c
index b1d6da3..cd93b62 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -1138,6 +1138,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;