I'm using xterm.js in a React app and would like to implement the following behavior:
When the user scrolls to the top of the terminal, a fixed number of new lines should be added above the existing ones.
I've attempted this by manipulating the buffer with the following approach:
Copy the current buffer lines.
Create a new array of lines.
Append the new lines to the terminal.
However, this feels more like a workaround, and I'm having difficulty achieving a smooth experience, for example when the lines are added the selection is resetting. Is there a better or recommended way to handle this ?
Hi!
I'm using
xterm.js
in a React app and would like to implement the following behavior:I've attempted this by manipulating the buffer with the following approach:
However, this feels more like a workaround, and I'm having difficulty achieving a smooth experience, for example when the lines are added the selection is resetting. Is there a better or recommended way to handle this ?