mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #462] How To: Use TextView with Spinner (io.Writer) like yacspin #331
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#331
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghostsquad on GitHub (Jun 15, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/462
https://github.com/theckman/yacspin supports providing an io.Writer to write to via the spinner config. I tried just giving the spinner the TextView, and hooking up an "on changed" func per the wiki:
But I end up with this:
Ignoring for the moment the color incompatibility issue... it appears that the carriage return
\ris not being respected, as that's I believe how yacspin returns the the beginning to rewrite.Is there a correct way to do this?
@ghostsquad commented on GitHub (Jun 17, 2020):
I found an exceedingly simple alternative to yacspin that will work for my needs here: https://github.com/tj/go-spin