url-select: new selection method
see: https://github.com/muennich/urxvt-perls/issues/18
This commit is contained in:
parent
c3977f5565
commit
21ed78a650
17
url-select
17
url-select
@ -185,8 +185,12 @@ sub select_next {
|
|||||||
$self->{n} += $dir;
|
$self->{n} += $dir;
|
||||||
hilight($self);
|
hilight($self);
|
||||||
if ($self->{copy}) {
|
if ($self->{copy}) {
|
||||||
$self->selection($self->{found}->[$self->{n}]->[4]);
|
my $found = $self->{found}[$self->{n}];
|
||||||
$self->selection_grab($event->{time});
|
$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;
|
return;
|
||||||
}
|
}
|
||||||
@ -212,8 +216,12 @@ sub select_next {
|
|||||||
$self->{n} = $dir < 0 ? $#{$self->{found}} : 0;
|
$self->{n} = $dir < 0 ? $#{$self->{found}} : 0;
|
||||||
hilight($self);
|
hilight($self);
|
||||||
if ($self->{copy}) {
|
if ($self->{copy}) {
|
||||||
$self->selection($self->{found}->[$self->{n}]->[4]);
|
my $found = $self->{found}[$self->{n}];
|
||||||
$self->selection_grab($event->{time});
|
$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;
|
return;
|
||||||
}
|
}
|
||||||
@ -334,4 +342,3 @@ sub deactivate {
|
|||||||
|
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user