Skip to content

Commit

Permalink
fix bug in insert_column
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Nov 27, 2024
1 parent f2f606c commit 1598aed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Prima/Grids.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2269,8 +2269,9 @@ sub insert_column
my ( $self, $column, @cells) = @_;
my $c = $self-> {columns};
$column = $c if $column > $c;
my $r = $self-> {rows};
my $i;
my $lim = ( scalar(@cells) < $c) ? scalar(@cells) : $c;
my $lim = ( scalar(@cells) < $r) ? scalar(@cells) : $r;
for ( $i = 0; $i < $lim; $i++) {
$c = $self-> {cells}-> [$i];
splice( @$c, $column, 0, $cells[$i]);
Expand Down

0 comments on commit 1598aed

Please sign in to comment.