-
-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to not clear the terminal when finishing the screen #262
Comments
This is going to have mixed results. The issue is that on some terminals, we wind up using an alternate screen, so when the program exits the default screen is restored. This is typical for xterm for example. This is more or less baked into the terminal initialization sequences, and we don't really know about it. If you're on Windows or on a terminal that doesn't suffer this problem, then yes, you might be able to use this approach. |
So this is unofficial for now, but on master (or 2.7.4) if you put TCELL_ALTSCREEN=disable in your environment, it should do what you want. Please let me know if this helps. I have not yet decided to make this more official in another manner. |
Hi! This feature is exactly what we've been missing. I really hope that you will not remove it in future releases |
I found a couple of workarounds. Instead of using w, h := s.Size()
s.ShowCursor(0, h - 1)
for x := 0; x < w; x++ {
s.SetContent(x, h - 1, ' ', nil, tcell.StyleDefault)
}
s.Show() Or, I found another package that calls https://pkg.go.dev/github.com/noborus/ov/oviewer#Root.WriteOriginal |
Hi,
My application would benefit from keeping some terminal contents after exiting.
Is it reasonable to have an option to not clear the Screen on Fini() ?
Would it be enough to make the code portion below optional?
t.TPuts(ti.Clear)
Thanks,
Everton
The text was updated successfully, but these errors were encountered: