url-select: new selection method

see: https://github.com/muennich/urxvt-perls/issues/18
This commit is contained in:
Wojciech Siewierski 2012-04-02 11:20:44 +02:00
parent c3977f5565
commit 21ed78a650

View File

@ -185,8 +185,12 @@ sub select_next {
$self->{n} += $dir;
hilight($self);
if ($self->{copy}) {
$self->selection($self->{found}->[$self->{n}]->[4]);
$self->selection_grab($event->{time});
my $found = $self->{found}[$self->{n}];
$self->selection_beg(${$found}[0], ${$found}[1]);
$self->selection_end(${$found}[2], ${$found}[3]);
$self->selection_make($event->{time});
$self->selection_beg(1, 0);
$self->selection_end(1, 0);
}
return;
}
@ -212,8 +216,12 @@ sub select_next {
$self->{n} = $dir < 0 ? $#{$self->{found}} : 0;
hilight($self);
if ($self->{copy}) {
$self->selection($self->{found}->[$self->{n}]->[4]);
$self->selection_grab($event->{time});
my $found = $self->{found}[$self->{n}];
$self->selection_beg(${$found}[0], ${$found}[1]);
$self->selection_end(${$found}[2], ${$found}[3]);
$self->selection_make($event->{time});
$self->selection_beg(1, 0);
$self->selection_end(1, 0);
}
return;
}
@ -334,4 +342,3 @@ sub deactivate {
()
}