From 44a39a44c94d29841e2e30651345ffe04d4507e7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 15 Oct 2015 23:33:06 +1300 Subject: Use real return values in clip --- urxvt/ext/clip | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'urxvt/ext') 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; } -- cgit v1.2.3