Struggling to get using xtermjs, and have some questions which aren't covered in the official documentation, at least I didn't find.
- I understand that when I use some app within the terminal, for example, Vim terminal need to be switched to alternate buffer, after I quit from the app, terminal switched back to the normal buffer. Is this right?
- To switch between buffers (and overall to control terminal behavior) I need to use a control sequence. It isn't something unique to xterm.js, but the common pattern and control sequence is unified between terminals?
- Control sequence to switch to the alternate buffer is
CSI ? Pm h
with parameter47
according to documentation:
DECSET DEC Private Set Mode CSI ? Pm h Set various terminal attributes.
Where
paramAction
47 - Use Alternate Screen Buffer.
- How to use this control sequence with xterm.js, for example, I want to switch to alternate buffer. What string should be used in
terminal.write(...)
?