If a key sequence ending with an isearch terminator is bound to a
function that longjmps, entering such a sequence during an isearch
causes readline to loop forever.
echo '".\e": end-kbd-macro' > irc
INPUTRC=irc bash --norc -in <<< $'X\n\cRX.\e'
---
lib/readline/util.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/readline/util.c b/lib/readline/util.c
index d03c899e..acc6c7d2 100644
--- a/lib/readline/util.c
+++ b/lib/readline/util.c
@@ -112,6 +112,7 @@ _rl_abort_internal (void)
RL_UNSETSTATE (RL_STATE_MULTIKEY); /* XXX */
rl_last_func = (rl_command_func_t *)NULL;
+ _rl_command_to_execute = NULL;
_rl_longjmp (_rl_top_level, 1);
return (0);
--
2.47.1