mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #1008] Is there an easy way to capture "final" output? #727
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#727
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 @aronchick on GitHub (Jul 16, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1008
When i'm drawing, and then quit, the screen wipes. This is fine, but i'd like to capture the last rendered state, and display it after exiting. I can't seem to find this anywhere - is there guidance how to do it?
@rivo commented on GitHub (Aug 4, 2024):
This is a property of the
tcellpackage.I suppose you could supply your own
Screenobject usingSetScreen()and extract the contents after your program exits.@aronchick commented on GitHub (Aug 4, 2024):
Oh fascinating - does screen have a string buffer like object that I could
use to render to the console?
On Sun, Aug 4, 2024 at 07:03 rivo @.***> wrote:
@rivo commented on GitHub (Aug 6, 2024):
Check the documentation:
https://pkg.go.dev/github.com/gdamore/tcell/v2#Screen
@aronchick commented on GitHub (Oct 16, 2024):
I ended up just grabbing the final buffer and printing it.