return if @{$matches} == 0;
# Don't return on initial run to give the user a chance to select another
# mode, e.g. to switch from URL selection to search selection.
- if (@{$matches} == 1 and not $config->{state}->{initial}) {
+ if (@{$matches} == 1 and not $config->{state}{initial}) {
return { match => $matches->[0] };
}
$config->{state}{initial} = 0;
goto RESULT; # reprocess special entries in result
}
if (defined $result->{match}) {
- if (not defined $result->{match}->{value}) {
- $result->{match}->{value} = $result->{match}->{string};
+ if (not defined $result->{match}{value}) {
+ $result->{match}{value} = $result->{match}{string};
}
debug \%config, 'input', 'running handler';
# Choose handler with falling priority.
my @handlers = (
$config{state}{handler}, # set by user
- $result->{match}->{handler}, # set by match
+ $result->{match}{handler}, # set by match
$result->{handler}, # set by mapping
$config{handler}{yank}, # fallback
);