mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-07 07:31:12 +08:00
Hide the cursor in progressive mode
This commit is contained in:
parent
c74d54623d
commit
ea4c2a5c70
@ -34,11 +34,13 @@ module YouPlot
|
|||||||
elsif options[:progressive]
|
elsif options[:progressive]
|
||||||
stop = false
|
stop = false
|
||||||
Signal.trap(:INT) { stop = true }
|
Signal.trap(:INT) { stop = true }
|
||||||
|
options[:output].print "\e[?25l" # make cursor invisible
|
||||||
while (input = Kernel.gets)
|
while (input = Kernel.gets)
|
||||||
main_progressive(input)
|
main_progressive(input)
|
||||||
break if stop
|
break if stop
|
||||||
end
|
end
|
||||||
options[:output].print "\e[0J"
|
options[:output].print "\e[0J"
|
||||||
|
options[:output].print "\e[?25h" # make cursor visible
|
||||||
else
|
else
|
||||||
# Sometimes the input file does not end with a newline code.
|
# Sometimes the input file does not end with a newline code.
|
||||||
while (input = Kernel.gets(nil))
|
while (input = Kernel.gets(nil))
|
||||||
|
Loading…
Reference in New Issue
Block a user