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. FossilOrigin-Name: aafd253afe473a0a262860698a5a43e4db4d990565b353e6c1399ffc4c6658b5
This commit is contained in:
parent
2529c59c44
commit
0693bcf458
1 changed files with 5 additions and 1 deletions
6
shelldap
6
shelldap
|
|
@ -2769,7 +2769,11 @@ my $sigset = POSIX::SigSet->new();
|
||||||
sub ctrl_c_handler {
|
sub ctrl_c_handler {
|
||||||
print "\n";
|
print "\n";
|
||||||
$shell->term->on_new_line;
|
$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;
|
$shell->term->redisplay;
|
||||||
}
|
}
|
||||||
my $sigaction = POSIX::SigAction->new( \&ctrl_c_handler, $sigset, 0);
|
my $sigaction = POSIX::SigAction->new( \&ctrl_c_handler, $sigset, 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue