[GH-ISSUE #1008] Is there an easy way to capture "final" output? #727

Closed
opened 2026-03-04 01:07:19 +03:00 by kerem · 4 comments
Owner

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?

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?
kerem closed this issue 2026-03-04 01:07:19 +03:00
Author
Owner

@rivo commented on GitHub (Aug 4, 2024):

This is a property of the tcell package.

I suppose you could supply your own Screen object using SetScreen() and extract the contents after your program exits.

<!-- gh-comment-id:2267501041 --> @rivo commented on GitHub (Aug 4, 2024): This is a property of the [`tcell`](https://github.com/gdamore/tcell) package. I suppose you could supply your own `Screen` object using [`SetScreen()`](https://pkg.go.dev/github.com/rivo/tview#Application.SetScreen) and extract the contents after your program exits.
Author
Owner

@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:

This is a property of the tcell https://github.com/gdamore/tcell
package.

I suppose you could supply your own Screen object using SetScreen()
https://pkg.go.dev/github.com/rivo/tview#Application.SetScreen and
extract the contents after your program exits.


Reply to this email directly, view it on GitHub
https://github.com/rivo/tview/issues/1008#issuecomment-2267501041, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAMQ5P7TRXZ4AB33ASO5XTZPYDBBAVCNFSM6AAAAABK64OAJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGUYDCMBUGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2267513844 --> @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: > This is a property of the tcell <https://github.com/gdamore/tcell> > package. > > I suppose you could supply your own Screen object using SetScreen() > <https://pkg.go.dev/github.com/rivo/tview#Application.SetScreen> and > extract the contents after your program exits. > > — > Reply to this email directly, view it on GitHub > <https://github.com/rivo/tview/issues/1008#issuecomment-2267501041>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAAMQ5P7TRXZ4AB33ASO5XTZPYDBBAVCNFSM6AAAAABK64OAJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGUYDCMBUGE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@rivo commented on GitHub (Aug 6, 2024):

Check the documentation:

https://pkg.go.dev/github.com/gdamore/tcell/v2#Screen

<!-- gh-comment-id:2271093787 --> @rivo commented on GitHub (Aug 6, 2024): Check the documentation: https://pkg.go.dev/github.com/gdamore/tcell/v2#Screen
Author
Owner

@aronchick commented on GitHub (Oct 16, 2024):

I ended up just grabbing the final buffer and printing it.

<!-- gh-comment-id:2415595147 --> @aronchick commented on GitHub (Oct 16, 2024): I ended up just grabbing the final buffer and printing it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#727
No description provided.