diff --git a/url-select b/url-select index fe3aa1a..38d7b67 100755 --- a/url-select +++ b/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 { () } -