Commit d6990d22 authored by Martin Panter's avatar Martin Panter

Issue #24266: Cancel history search mode with Ctrl+C in Readline 7

parent e46487b1
...@@ -94,6 +94,9 @@ Core and Builtins ...@@ -94,6 +94,9 @@ Core and Builtins
Library Library
------- -------
- Issue #24266: Ctrl+C during Readline history search now cancels the search
mode when compiled with Readline 7.
- Issue #26560: Avoid potential ValueError in BaseHandler.start_response. - Issue #26560: Avoid potential ValueError in BaseHandler.start_response.
Initial patch by Peter Inglesby. Initial patch by Peter Inglesby.
......
...@@ -1140,6 +1140,9 @@ readline_until_enter_or_signal(const char *prompt, int *signal) ...@@ -1140,6 +1140,9 @@ readline_until_enter_or_signal(const char *prompt, int *signal)
#endif #endif
if (s < 0) { if (s < 0) {
rl_free_line_state(); rl_free_line_state();
#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0700
rl_callback_sigcleanup();
#endif
rl_cleanup_after_signal(); rl_cleanup_after_signal();
rl_callback_handler_remove(); rl_callback_handler_remove();
*signal = 1; *signal = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment