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

Comparing rxvt-unicode/src/perl/selection (file contents):
Revision 1.36 by root, Wed Jan 25 15:33:43 2006 UTC vs.
Revision 1.37 by root, Mon Feb 6 06:14:08 2006 UTC

20 for (my $idx = 0; defined (my $res = $self->x_resource ("selection.pattern-$idx")); $idx++) { 20 for (my $idx = 0; defined (my $res = $self->x_resource ("selection.pattern-$idx")); $idx++) {
21 $res = $self->locale_decode ($res); 21 $res = $self->locale_decode ($res);
22 utf8::encode $res; 22 utf8::encode $res;
23 push @{ $self->{patterns} }, qr/$res/; 23 push @{ $self->{patterns} }, qr/$res/;
24 } 24 }
25
26 $self->{enabled} = 1;
27
28 push @{ $self->{term}{option_popup_hook} }, sub {
29 ("new selection" => $self->{enabled}, sub { $self->{enabled} = shift })
30 };
25 31
26 () 32 ()
27} 33}
28 34
29# "find interesting things"-patterns 35# "find interesting things"-patterns
61 qr{^(.*)[,\-]$}, # strip off trailing , and - 67 qr{^(.*)[,\-]$}, # strip off trailing , and -
62); 68);
63 69
64sub on_sel_extend { 70sub on_sel_extend {
65 my ($self, $time) = @_; 71 my ($self, $time) = @_;
72
73 $self->{enabled}
74 or return;
66 75
67 my ($row, $col) = $self->selection_mark; 76 my ($row, $col) = $self->selection_mark;
68 my $line = $self->line ($row); 77 my $line = $self->line ($row);
69 my $text = $line->t; 78 my $text = $line->t;
70 my $markofs = $line->offset_of ($row, $col); 79 my $markofs = $line->offset_of ($row, $col);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines