Disable local echo during animation
This commit is contained in:
parent
7ec4d31219
commit
9ef84285a4
1 changed files with 2 additions and 0 deletions
|
@ -45,12 +45,14 @@ sub hook_add {
|
|||
my $text = join "\n", map ">> $_ <<", @warnings;
|
||||
my $delay = 1.5 / length($text);
|
||||
|
||||
system "stty -echo 2>/dev/null";
|
||||
print "\e[7m"; # reverse video
|
||||
for my $c (split //, $text) {
|
||||
print $c eq "\n" ? "\e[0m\n\e[7m" : $c;
|
||||
sleep $delay;
|
||||
}
|
||||
print "\e[0m\n";
|
||||
system "stty echo 2>/dev/null";
|
||||
sleep .5;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue