ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/mark-urls
(Generate patch)

Comparing rxvt-unicode/src/perl/mark-urls (file contents):
Revision 1.5 by root, Wed Jan 11 02:13:56 2006 UTC vs.
Revision 1.6 by root, Thu Jan 12 01:30:53 2006 UTC

33 } 33 }
34 34
35 () 35 ()
36} 36}
37 37
38sub on_button_press { 38sub on_button_release {
39 my ($self, $event) = @_; 39 my ($self, $event) = @_;
40 my $row = $event->{row}; 40 my $row = $event->{row};
41 my $col = $event->{col}; 41 my $col = $event->{col};
42 42
43 my $line = $self->line ($row); 43 my $line = $self->line ($row);
44 my $text = $line->t; 44 my $text = $line->t;
45 45
46 if ($event->{button} == 2) {
46 while($text =~ /$url/g) { 47 while ($text =~ /$url/g) {
47 if ($-[0] <= $col && $+[0] >= $col) { 48 if ($-[0] <= $col && $+[0] >= $col) {
48 system "$self->{browser} \Q$1\E &"; 49 system "$self->{browser} \Q$1\E &";
49 return 1; 50 return 1;
51 }
50 } 52 }
51 } 53 }
54
52 () 55 ()
53} 56}
54 57

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines