From 9ef84285a497d6bf49acdcbd5a4cef3e5bf3f1c1 Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Tue, 4 Sep 2018 23:34:14 +0200 Subject: [PATCH] Disable local echo during animation --- plugins/warnings | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/warnings b/plugins/warnings index 4993191..953c9f7 100755 --- a/plugins/warnings +++ b/plugins/warnings @@ -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; }