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

Comparing rxvt-unicode/src/perl/selection-popup (file contents):
Revision 1.5 by root, Mon Jan 9 06:29:47 2006 UTC vs.
Revision 1.6 by root, Mon Jan 9 07:17:24 2006 UTC

1#! perl 1#! perl
2 2
3sub msg { 3sub msg {
4 my ($self, $msg1, $msg2) = @_; 4 my ($self, $msg) = @_;
5 5
6 my $overlay = $self->overlay (0, 0, 6 my $overlay = $self->overlay (0, 0, $self->strwidth ($msg), 1);
7 (List::Util::max map $self->strwidth ($_), $msg1, $msg2), 2);
8 $overlay->set (0, 0, $msg1); 7 $overlay->set (0, 0, $msg);
9 $overlay->set (0, 1, $msg2);
10 my $iow; $iow = urxvt::timer->new->start (urxvt::NOW + 1)->cb (sub { 8 my $iow; $iow = urxvt::timer->new->start (urxvt::NOW + 1)->cb (sub {
11 undef $overlay; 9 undef $overlay;
12 undef $iow; 10 undef $iow;
13 }); 11 });
14} 12}
45 $cb->(); 43 $cb->();
46 44
47 if ($orig ne $_) { 45 if ($orig ne $_) {
48 $self->selection ($_); 46 $self->selection ($_);
49 s/[\x00-\x1f\x80-\x9f]/·/g; 47 s/[\x00-\x1f\x80-\x9f]/·/g;
50 $self->msg ("Selection replaced by", $_); 48 $self->msg ($self->special_encode ($_));
51 } 49 }
52 } 50 }
53 }); 51 });
54 }; 52 };
55 53

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines