Details
Steps to reproduce
- create a empty terminal
- install the xterm-addon-serialize
- write the following string into it
const SMCUP = '\u001b[?1049h'; // enable alternative screen
const CUP = '\u001b[H'; // move cursor to top left
terminal.write(`1${SMCUP}${CUP}2`)
- read the result using
serializeAddon.serialize()
Expect
You get the normal screen + alt screen in the result.
(Not sure which sequence is used to move the cursor, because there are too many ways to do it)
Actually
You get 2
The addon did not realize there is another screen exist.
Note
I am not sure whether is it designed to not do it or not.
But the normal screen is required to rebuild the terminal from empty (or exit the htop will no longer bring you back to original prompt), so I guess it is missing?
I play with it a bit. /src/SerializeAddon.ts#L192-L201k
And if it should do it
- whether it is always enabled or expose as a option?
- do alt screen affected by the
rows option?
Details
Steps to reproduce
serializeAddon.serialize()Expect
You get the normal screen + alt screen in the result.
(Not sure which sequence is used to move the cursor, because there are too many ways to do it)
Actually
You get
2The addon did not realize there is another screen exist.
Note
I am not sure whether is it designed to not do it or not.
But the normal screen is required to rebuild the terminal from empty (or exit the htop will no longer bring you back to original prompt), so I guess it is missing?
I play with it a bit. /src/SerializeAddon.ts#L192-L201k
And if it should do it
rowsoption?