Skip to content

Commit 0b2d71b

Browse files
committed
Issue python#24266: Merge readline Ctrl+C handling from 3.5
2 parents 2efdc8c + d6990d2 commit 0b2d71b

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎Misc/NEWS‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ Core and Builtins
232232
Library
233233
-------
234234

235+
- Issue #24266: Ctrl+C during Readline history search now cancels the search
236+
mode when compiled with Readline 7.
237+
235238
- Issue #26590: Implement a safe finalizer for the _socket.socket type. It now
236239
releases the GIL to close the socket.
237240

‎Modules/readline.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,9 @@ readline_until_enter_or_signal(const char *prompt, int *signal)
11381138
#endif
11391139
if (s < 0) {
11401140
rl_free_line_state();
1141+
#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0700
1142+
rl_callback_sigcleanup();
1143+
#endif
11411144
rl_cleanup_after_signal();
11421145
rl_callback_handler_remove();
11431146
*signal = 1;

0 commit comments

Comments
 (0)