Subject: | ->erase_at and CONT cells |
Hi,
Seems to be an issue around the handling of CONT cells when erasing. The attached test case dies with:
TODO: cell in state 3 at ../Tickit/RenderContext.pm line 953
and this seems to happen when calling ->erase from a starting cell that currently contains CONT. My first guess would be that the cell after the erase would need updating to LINE which I'm guessing is the responsibility of the _xs_make_span code?
cheers,
Tom
Subject: | case.pl |
#!/usr/bin/perl
use strict;
use warnings;
package TestCase;
use parent qw(Tickit::Widget);
use Tickit::RenderContext;
use constant CLEAR_BEFORE_RENDER => 0;
sub lines { 1 }
sub cols { 1 }
sub render {
my $self = shift;
my %args = @_;
my $win = $self->window or return;
# We're going
my $rc = Tickit::RenderContext->new(
lines => $win->lines,
cols => $win->cols,
);
$rc->hline_at(0, 2, 5, Tickit::RenderContext->LINE_SINGLE, Tickit::Pen->new(fg => 'white'));
$rc->erase_at(0, 3, 6, Tickit::Pen->new(fg => 'white'));
$rc->hline_at(0, 4, 7, Tickit::RenderContext->LINE_SINGLE, Tickit::Pen->new(fg => 'white'));
$rc->flush_to_window($win);
}
package main;
use Tickit::Async;
$_->set_root_widget(TestCase->new) and $_->run for Tickit::Async->new;