#!/usr/bin/env raku

use Terminal::ANSI;
use thelper;

save-screen;
clear-screen;
home;

my $row = 1;
my $col = 1;
my $height = 5;
print-at $row,$col, "━" x 20;
print-at $row + $height,$col, "━" x 20;
my $on = $row;
for 1..10 {
 set-scroll-region($row + 1,$row + $height - 1);
 scroll-up if $on >= $row + $height - 1;
 move-to ++$on min $row + $height - 1, 1;
 print "this is line $_";
}
reset-scroll-region;
move-to 10,1;

await-test;
