tab-rs icon indicating copy to clipboard operation
tab-rs copied to clipboard

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

Open austinjones opened this issue 3 years ago • 7 comments

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

austinjones avatar Jan 30 '21 01:01 austinjones

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

gregwebs avatar May 10 '21 16:05 gregwebs

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 https://github.com/austinjones/tab-rs/issues/333.

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

$ tab --shutdown

gnawhleinad avatar May 10 '21 20:05 gnawhleinad

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

guy-who-googles avatar May 10 '21 22:05 guy-who-googles

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...

austinjones avatar May 11 '21 15:05 austinjones

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

gregwebs avatar May 11 '21 15:05 gregwebs

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 avatar Aug 28 '21 19:08 dtomvan

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

dtomvan avatar Aug 29 '21 13:08 dtomvan