Skip to content

Implement a much more efficient scrollback buffer - which only prints the required output to reconstruct a session #336

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

austinjones
Copy link
Owner

@austinjones austinjones commented Jan 30, 2021

Blockers to merge:

  • Needs lots of tests
  • Need to merge vt100 changes to upstream.
  • Need to make the number of scrollback lines configurable in ~/.config/tab.yml
  • Need to make sure this works on: Ubuntu, NixOS, Void Linux, OSX iTerm, OSX Alacritty, OSX Terminal
  • Need to make sure this works with: vim, nano, kak, top, ytop, btm

… the required output to reconstruct a session
@gregwebs
Copy link
Contributor

Is there currently a workaround for this issue? Both clear and reset do not seem to help.

@gnawhleinad
Copy link
Contributor

Is there currently a workaround for this issue? Both clear and reset do not seem to help.

@gregwebs, AFAIK, this pull rquest aims to address #333.

I think the workaround is to shutdown and restart tab via:

$ tab --shutdown

@guy-who-googles
Copy link

guy-who-googles commented May 10, 2021

I've been closing and reopening tabs with too long/large scrollback buffers. For example:

tab example_tab/   # tab loads for a few seconds with a bunch of shell history
exit
tab example_tab/   # create fresh tab with same name

@austinjones
Copy link
Owner Author

Yeah, the best workaround at the moment is to exit or tab -w my-tab.

I was testing this and it has many 'screen corruption' bugs due to incorrect cursor position calculations. So it's not ready to merge/release yet. Still looking for a solution...

@gregwebs
Copy link
Contributor

Thanks for the workaround suggestions! What solutions are other terminal multiplexers using for this problem?

@dtomvan
Copy link

dtomvan commented Aug 28, 2021

Thanks for the workaround suggestions! What solutions are other terminal multiplexers using for this problem?

Tmux seems to use some cell datatype (if I’m correct) and it keeps track of which ones to draw at all times, per pane.

Edit: tmux handles scrolling by itself, by capturing mouse events, and swapping out these so-called cells instead of printing everything for scrollback.

@dtomvan
Copy link

dtomvan commented Aug 29, 2021

image

Left: alacritty with neovim
Right: alacritty with neovim in tab

For some reason coloring doesn't work?

Edit: I'm an idiot. :syntax on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants