Revision: | 1.2 |
Committed: | Fri Sep 21 22:55:56 2012 UTC (11 years, 9 months ago) by root |
Branch: | MAIN |
CVS Tags: | rxvt-unicode-rel-9_16, rxvt-unicode-rel-9_19, rxvt-unicode-rel-9_18, rxvt-unicode-rel-9_26, rxvt-unicode-rel-9_17, rxvt-unicode-rel-9_25, rxvt-unicode-rel-9_22, rxvt-unicode-rel-9_20, rxvt-unicode-rel-9_21 |
Changes since 1.1: | +15 -0 lines |
Log Message: | *** empty log message *** |
# | User | Rev | Content |
---|---|---|---|
1 | sf-exg | 1.1 | #! perl |
2 | |||
3 | root | 1.2 | =head1 NAME |
4 | |||
5 | clipboard-osc - implement the clipboard operating system command sequence | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | urxvt -pe clipboard-osc | ||
10 | |||
11 | =head1 DESCRIPTION | ||
12 | |||
13 | This extension implements the clipboard;copy Perl OSC. | ||
14 | |||
15 | =cut | ||
16 | |||
17 | |||
18 | sf-exg | 1.1 | sub on_osc_seq_perl { |
19 | my ($self, $osc, $resp) = @_; | ||
20 | |||
21 | return unless $osc =~ s/^clipboard;([^;]+)//; | ||
22 | |||
23 | if ($1 eq "copy") { | ||
24 | my $text = $self->selection (); | ||
25 | $self->selection ($text, 1); | ||
26 | $self->selection_grab (urxvt::CurrentTime, 1); | ||
27 | } | ||
28 | |||
29 | 1 | ||
30 | } |