Force Kill, Bugfixes, and Small Improvements
This is mostly a bugfix release, but there’s also a new feature where you can quit a Bubble Tea program immediately, skipping the final render, but still restoring the terminal state:
p := tea.NewProgram(model{})
go func() {
if err := p.Start(); err != nil {
fmt.Println("Oh no:", err)
os.Exit(1)
}
}()
// Later
p.Kill()
This can be useful in when to you need fine-grained management over a Bubble Tea program when using something like Wish. Special thanks to @aymanbagabas for implementing this swiftly and acutely.
New
- Added
Kill()
method to force quit the program and restore terminal state #219 - Support batched mouse events #215 (see #212 for details)
Fixed
- Allocate msgs channel in constructor to fix a data race (thanks @paralin!) #180
- Handle
nil
cmds intea.Sequentially
(thanks @ajeetdsouza!) #214 tea.Batch
now returnsnil
if all cmds are nil #217- Don't check terminal size if output is not a terminal #228
New Contributors
- @mamachanko made their first contribution in #178
- @paralin made their first contribution in #180
- @dependabot made their first contribution in #203
- @ajeetdsouza made their first contribution in #214
Full Changelog: v0.19.3...v0.20.0
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or Slack.