ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/clipboard-osc
Revision: 1.3
Committed: Sat Jul 24 11:58:27 2021 UTC (2 years, 9 months ago) by root
Branch: MAIN
CVS Tags: rxvt-unicode-rel-9_29, rxvt-unicode-rel-9_30, HEAD
Changes since 1.2: +2 -0 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #! perl
2
3 #:META:OSC_PERL:clipboard:man clipboard-osc
4
5 =head1 NAME
6
7 clipboard-osc - implement the clipboard operating system command sequence
8
9 =head1 SYNOPSIS
10
11 urxvt -pe clipboard-osc
12
13 =head1 DESCRIPTION
14
15 This extension implements the clipboard;copy Perl OSC.
16
17 =cut
18
19
20 sub on_osc_seq_perl {
21 my ($self, $osc, $resp) = @_;
22
23 return unless $osc =~ s/^clipboard;([^;]+)//;
24
25 if ($1 eq "copy") {
26 my $text = $self->selection ();
27 $self->selection ($text, 1);
28 $self->selection_grab (urxvt::CurrentTime, 1);
29 }
30
31 1
32 }