Based on @knz's work in #499, but slightly supersedes this change.
A little more coupling in the resize handling, but a lot less code
& logic repetition.
Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
This commit implements cancelable reads, which allows Bubble Tea programs to run in succession in a single application. It also makes sure all goroutines terminate before `Program.Start()` returns.
Closes#24.
The golang.org/x/crypto/ssh/terminal package is deprecated and merely a
wrapper around golang.org/x/term. Use the latter directly and avoid the
dependency on the former altogether.