xterm.js icon indicating copy to clipboard operation
xterm.js copied to clipboard

Scrollback emulation in alternative buffer

Open Eugeny opened this issue 4 years ago • 1 comments

iTerm has this great thing where they capture the lines that get scrolled off the top of the alternate buffer into a separate scrollback buffer, effectively allowing mouse scroll in GNU screen: https://iterm2.com/documentation-preferences-profiles-terminal.html - "Save lines to scrollback in alternate screen mode"

Eugeny avatar Jan 14 '22 09:01 Eugeny

This would probably be pretty easy to do, just add scrollback to our alt buffer. Though I think right now hasScrollback might be used to mean is alt buffer in places:

https://github.com/xtermjs/xterm.js/blob/e1578813a79e657c81baa4f7632a30d0093cec71/src/common/buffer/Buffer.ts#L48

The harder part is figuring out how this would work with wheel events going to the process.

Tyriar avatar Jan 15 '22 20:01 Tyriar