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

Comparing rxvt-unicode/src/perl/selection-autotransform (file contents):
Revision 1.1 by root, Thu Jan 12 12:05:28 2006 UTC vs.
Revision 1.2 by root, Fri Jan 13 01:09:37 2006 UTC

18 warn "running with elevated privileges, ignoring selection-autotransform patterns"; 18 warn "running with elevated privileges, ignoring selection-autotransform patterns";
19 return; 19 return;
20 } 20 }
21 21
22 for (my $idx = 0; defined (my $res = urxvt::untaint $self->x_resource ("selection-autotransform.$idx")); $idx++) { 22 for (my $idx = 0; defined (my $res = urxvt::untaint $self->x_resource ("selection-autotransform.$idx")); $idx++) {
23 warn "<<<$idx:$res>>>\n";#d#
23 my $transform = eval "sub { $res }"; 24 my $transform = eval "sub { $res }";
24 25
25 if ($transform) { 26 if ($transform) {
26 push @{ $self->{transforms} }, $transform; 27 push @{ $self->{transforms} }, $transform;
27 } else { 28 } else {
42 $transform->(); 43 $transform->();
43 if ($text ne $_) { 44 if ($text ne $_) {
44 $self->selection ($_); 45 $self->selection ($_);
45 s/[\x00-\x1f\x80-\x9f]/·/g; 46 s/[\x00-\x1f\x80-\x9f]/·/g;
46 $self->msg ($self->special_encode ("auto-transformed to $_")); 47 $self->msg ($self->special_encode ("auto-transformed to $_"));
48 last;
47 } 49 }
48
49 last;
50 } 50 }
51 51
52 () 52 ()
53} 53}
54 54

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines