Merged in docelic/shelldap (pull request #2)

Reset isearch state on ctrl+c when using Readline 7

Approved-by: Mahlon E. Smith <mahlon@martini.nu>

FossilOrigin-Name: 3cda1c11ffaae15eda9c530b16cc8881c58ad1bd5b769583ff9b6876a05e28bc
This commit is contained in:
Mahlon E. Smith 2019-05-17 18:12:46 +00:00
commit 3e5e79a0f6

View file

@ -2769,7 +2769,11 @@ my $sigset = POSIX::SigSet->new();
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);