Repository navigation
Calmer, cooler, sturdier 🧋
A patch release, but it's a good one! Idle Bubble Tea programs now really sit idle, the terminal gets restored after just about anything goes wrong, and a long list of renderer bugs is gone.
Rest light!
The renderer no longer redraws when there's nothing to draw. After about half a second without changes, the frame ticker stops, and it picks right back up the moment something does change. Views that are empty or taller than the screen also skip redraws when they haven't changed.
Restoring in many more cases!
Bubble Tea now cleans up properly when:
- A command in
BatchorSequencepanics Runreturns early with an errorRestoreTerminalswaps the input readerRunfinishes and the TTY files it opened for input need closing
And when you come back from suspending a program, Unicode mode comes back with it, so wide characters and emoji line up just like before!
Smoother rendering
- Resizing the terminal no longer flashes a stale frame.
- The view's height is right from the very first frame.
- Lines printed above your view keep their exact width, and they're measured the same way as the rest of your program.
- Running a subprocess with
Execclears your view first, so it doesn't leave a ghost behind.
Big thanks to everyone who contributed to this release, and especially to the many first-time contributors! 💘
Read more below! 👇🏻
Have a nice day,
Charm XX 🌟
Changelog
Fixed
- 9806b0c: fix(exec): clear View before releasing terminal for subprocess (#1762) (@zhaoxinyi02)
- 418cada: fix(logging): preserve Unicode prefix spacing (#1759) (@Ricardo-M-L)
- 94d45c8: fix(renderer): prevent emitting stale frame on resize (#1856) (@Guurdeep)
- 4853fda: fix(renderer): skip redraws when empty or tall views haven't changed (#1897) (@janearc)
- 6b30ecf: fix(renderer): use view height before first flush (#1766) (@fzlzjerry)
- 55ba0f6: fix: allow Program.Run to be called again after the program exits (#1890) (@simpleqt)
- 7a446b7: fix: avoid blocking prints after program exit (#1758) (@Ricardo-M-L)
- 1b8005f: fix: avoid terminal wait without input (#1829) (@lowgame)
- 13fb42d: fix: close the TTY files opened for input when Run returns (#1855) (@drawmeanelephant)
- 56a2fe7: fix: close the replaced cancel reader on RestoreTerminal (#1821) (@drmzperx)
- 18d6fa3: fix: close trace file after program run (#1844) (@lowgame)
- 5982a61: fix: data race with Kill() and Run() (#1774) (@andrinoff)
- f3d74b7: fix: ensure terminal state is restored after panics in Batch/Sequence commands (#1818) (@dajiaohuang)
- b9e7454: fix: make Quit a no-op before Run starts (#1840) (@tianrking)
- df137de: fix: measure insertAbove lines with the active width method (#1861) (@Sanjays2402)
- bd09ae6: fix: preserve exact-width lines printed above the view (#1888) (@imharjot)
- 12b7b4d: fix: restore terminal state on Run error paths (#1854) (@drawmeanelephant)
- 8675fd8: fix: restore unicode mode on resume (#1896) (@janearc)
Other stuff
- 73b79b3: Provide the platform input/signal stubs on wasip1/wasip2 (#1767) (@calvinrp)
- e4d617e: perf(renderer): stop the frame ticker while nothing changes (#1832) (@viktordanov)
- 38ddf5f: v2.1.2 (@andrinoff)
Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.
