From ea4c2a5c709ce385acc77cc7545def20980b1ae6 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Tue, 19 Jan 2021 20:04:29 +0900 Subject: [PATCH] Hide the cursor in progressive mode --- lib/youplot/command.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/youplot/command.rb b/lib/youplot/command.rb index 1667b11..1a6ad2e 100644 --- a/lib/youplot/command.rb +++ b/lib/youplot/command.rb @@ -34,11 +34,13 @@ module YouPlot elsif options[:progressive] stop = false Signal.trap(:INT) { stop = true } + options[:output].print "\e[?25l" # make cursor invisible while (input = Kernel.gets) main_progressive(input) break if stop end options[:output].print "\e[0J" + options[:output].print "\e[?25h" # make cursor visible else # Sometimes the input file does not end with a newline code. while (input = Kernel.gets(nil))