# HG changeset patch # Parent 37ed61b1234a8e7375e7e4d5d7561ad5dcf427cb diff -r 37ed61b1234a Modules/readline.c --- a/Modules/readline.c Tue May 26 20:46:29 2015 -0700 +++ b/Modules/readline.c Wed May 27 07:03:55 2015 +0000 @@ -1154,6 +1154,11 @@ rl_free_line_state(); rl_cleanup_after_signal(); rl_callback_handler_remove(); +#ifdef RL_UNSETSTATE + /* Work around a Gnu Readline bug where the incremental + search mode is not cancelled; see Issue 24266 */ + RL_UNSETSTATE(RL_STATE_ISEARCH); +#endif *signal = 1; completed_input_string = NULL; }