aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--urxvt/ext/clip7
1 files changed, 3 insertions, 4 deletions
diff --git a/urxvt/ext/clip b/urxvt/ext/clip
index 562ac180..94641d4a 100644
--- a/urxvt/ext/clip
+++ b/urxvt/ext/clip
@@ -14,8 +14,7 @@ our $VERSION = 1.0;
sub on_start {
my ($self) = @_;
- $self->enable( sel_grab => \&clip );
- return;
+ return $self->enable( sel_grab => \&clip );
}
sub clip {
@@ -24,10 +23,10 @@ sub clip {
utf8::encode($selection);
open my $clipboard, q{|-}, 'xsel -ib'
or croak('xsel(1) not available');
- print {$clipboard} $selection
+ my $written = print {$clipboard} $selection
or croak('Failed to write to xsel(1) pipe');
close $clipboard
or croak('Failed to close xsel(1) pipe');
- return;
+ return $written;
}