# HG changeset patch # User Davor Ocelic # Date 1557965824 -7200 # Node ID c1d8da18e65df1fac666f83fc312bf2034e96e98 # Parent 6c14c49fe4297f48c2b4d08f6b787d14d9d11e5a Reset isearch state on ctrl+c when using Readline 7 This change does not affect Readline versions below 7. A fix for RL<7 would be to modify readline_state to turn off ISEARCH and set DONE, but changing these values through the Perl module does not appear to have visible effect. diff -r 6c14c49fe429 -r c1d8da18e65d shelldap --- a/shelldap Wed May 08 20:45:04 2019 +0200 +++ b/shelldap Thu May 16 02:17:04 2019 +0200 @@ -2769,7 +2769,11 @@ sub ctrl_c_handler { print "\n"; $shell->term->on_new_line; - $shell->term->replace_line('', 0); + $shell->term->kill_text; + $shell->term->callback_sigcleanup; + $shell->term->free_line_state; + $shell->term->cleanup_after_signal; + $shell->term->callback_handler_remove; $shell->term->redisplay; } my $sigaction = POSIX::SigAction->new( \&ctrl_c_handler, $sigset, 0);