keyboard-select: cancel search mode when pattern not found
This commit is contained in:
parent
9078deb83e
commit
2a17920849
@ -1,7 +1,7 @@
|
|||||||
#! perl -w
|
#! perl -w
|
||||||
# Author: Bert Muennich
|
# Author: Bert Muennich
|
||||||
# Website: http://www.github.com/muennich/urxvt-perls
|
# Website: http://www.github.com/muennich/urxvt-perls
|
||||||
# Version: 1.3
|
# Version: git-20101001
|
||||||
# License: GPLv2
|
# License: GPLv2
|
||||||
|
|
||||||
# Use keyboard shortcuts to select and copy text.
|
# Use keyboard shortcuts to select and copy text.
|
||||||
@ -82,7 +82,13 @@ sub key_press {
|
|||||||
delete $self->{pattern};
|
delete $self->{pattern};
|
||||||
}
|
}
|
||||||
$self->{search} = '';
|
$self->{search} = '';
|
||||||
status_area($self) unless find_next($self);
|
if (not find_next($self)) {
|
||||||
|
if ($self->{search_mode}) {
|
||||||
|
deactivate($self);
|
||||||
|
} else {
|
||||||
|
status_area($self);
|
||||||
|
}
|
||||||
|
}
|
||||||
} elsif (length($char) > 0) {
|
} elsif (length($char) > 0) {
|
||||||
$self->{search} .= $self->locale_decode($char);
|
$self->{search} .= $self->locale_decode($char);
|
||||||
status_area($self);
|
status_area($self);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user