url-select: new selection method
see: https://github.com/muennich/urxvt-perls/issues/18
This commit is contained in:
parent
c3977f5565
commit
21ed78a650
19
url-select
19
url-select
@ -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,13 +216,17 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
deactivate($self) unless $self->{found};
|
||||
|
||||
()
|
||||
@ -334,4 +342,3 @@ sub deactivate {
|
||||
|
||||
()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user