aboutsummaryrefslogtreecommitdiff
path: root/urxvt
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-10-15 23:33:06 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-10-15 23:33:06 +1300
commit44a39a44c94d29841e2e30651345ffe04d4507e7 (patch)
treeb93c435f17ec9d630178a745614e4c7bacb05630 /urxvt
parentRestore previous command line in readline macros (diff)
downloaddotfiles-44a39a44c94d29841e2e30651345ffe04d4507e7.tar.gz
dotfiles-44a39a44c94d29841e2e30651345ffe04d4507e7.zip
Use real return values in clip
Diffstat (limited to 'urxvt')
-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;
}