Skip Menu |

This queue is for tickets about the Tickit-Widgets CPAN distribution.

Report information
The Basics
Id: 119857
Status: patched
Priority: 0/
Queue: Tickit-Widgets

People
Owner: Nobody in particular
Requestors: jaggz.h [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Mouse scrollwheel causes error in HSplit.pm
Date: Fri, 13 Jan 2017 23:20:25 -0800
To: bug-Tickit-Widgets [...] rt.cpan.org
From: Jaggz H <jaggz.h [...] gmail.com>
VBox HSplit (First entry) Table::Paged WrappedStatic WrappedStatic WrappedStatic WrappedStatic Mouse's scrollwheel causes errors like: Argument "down" isn't numeric in numeric eq (==) at /usr/local/share/perl/5.20.2/Tickit/Widget/HSplit.pm line 207, It appears the line of the error is: return unless $args->button == 1;
On Sat Jan 14 02:20:41 2017, jaggz.h@gmail.com wrote: Show quoted text
> Mouse's scrollwheel causes errors like: > Argument "down" isn't numeric in numeric eq (==) at > /usr/local/share/perl/5.20.2/Tickit/Widget/HSplit.pm line 207, > > It appears the line of the error is: > return unless $args->button == 1;
Yeah; there's probably quite a few bugs around like this in many other of the dists too. I wonder if a better approach might be required in general. -- Paul Evans
Patched. -- Paul Evans
Subject: rt119857.patch
=== modified file 'lib/Tickit/Widget/HSplit.pm' --- lib/Tickit/Widget/HSplit.pm 2017-02-15 15:04:46 +0000 +++ lib/Tickit/Widget/HSplit.pm 2017-03-17 18:49:02 +0000 @@ -204,8 +204,10 @@ my $self = shift; my ( $args ) = @_; - return unless $args->button == 1; - return $self->_on_mouse( $args->type, $args->line ); + if( $args->type ne "wheel" and $args->button == 1 ) { + return $self->_on_mouse( $args->type, $args->line ); + } + return; } =head1 AUTHOR === modified file 'lib/Tickit/Widget/VSplit.pm' --- lib/Tickit/Widget/VSplit.pm 2017-02-15 15:04:46 +0000 +++ lib/Tickit/Widget/VSplit.pm 2017-03-17 18:49:02 +0000 @@ -205,8 +205,10 @@ my $self = shift; my ( $args ) = @_; - return unless $args->button == 1; - return $self->_on_mouse( $args->type, $args->col ); + if( $args->type ne "wheel" and $args->button == 1 ) { + return $self->_on_mouse( $args->type, $args->col ); + } + return; } =head1 AUTHOR