keyboard-select: correctly close search field
This commit is contained in:
parent
98f1873fc6
commit
b2b85e0826
@ -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: git-20100912
|
# Version: git-20100913
|
||||||
# License: GPLv2
|
# License: GPLv2
|
||||||
|
|
||||||
# Use keyboard shortcuts to select and copy text.
|
# Use keyboard shortcuts to select and copy text.
|
||||||
@ -70,11 +70,11 @@ sub key_press {
|
|||||||
if ($txt) {
|
if ($txt) {
|
||||||
$self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ :
|
$self->{pattern} = ($txt =~ m/[[:upper:]]/) ? qr/\Q$txt\E/ :
|
||||||
qr/\Q$txt\E/i;
|
qr/\Q$txt\E/i;
|
||||||
} else {
|
} elsif ($self->{pattern}) {
|
||||||
delete $self->{pattern} if $self->{pattern};
|
delete $self->{pattern};
|
||||||
}
|
}
|
||||||
$self->{search} = '';
|
$self->{search} = '';
|
||||||
find_next($self);
|
status_area($self) unless find_next($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);
|
||||||
@ -321,7 +321,7 @@ sub find_next {
|
|||||||
$self->want_refresh();
|
$self->want_refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
()
|
return $found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user