ab5tract / Terminal-Print

Terminal::Print is a pure Raku layer for printing to terminal screens
Other
25 stars 18 forks source link

shutdown-screen does not return terminal to initial state with DecodedInput #59

Closed nige123 closed 5 years ago

nige123 commented 5 years ago

Firstly - thank you for Terminal::Print! I'm now using it as the frontend for a number of my scripts.

I'm encountering a problem, however, when using DecodedInput (although it may be due to not closing the Supply properly?).

The following code does not return the terminal to its initial state:


use Terminal::Print;
use Terminal::Print::DecodedInput;
my $tp = Terminal::Print.new;
$tp.initialize-screen;
my $in-supply = decoded-input-supply;
$tp.shutdown-screen;

Do I need to do something to the supply to make sure if shuts down correctly?

nige123 commented 5 years ago

I found calling .done on the supply in a whenever block fixed the problem.