Description
Details
- Browser and browser version: any(not a render issue)
- OS version: any
- xterm.js version: https://github.com/xtermjs/xterm.js/tree/56bfdb64d47bee71b192566a5c1c2f4e7403a6a3
- xterm-addon-serialize version: https://github.com/xtermjs/xterm.js/tree/56bfdb64d47bee71b192566a5c1c2f4e7403a6a3
Steps to reproduce
I took a try on implement the todo items in xterm-addon-serialize
And I find a few issue.
(This issue may better be classified a question. But it seems it is weird to ask this is SO as this is not a usage question.)
The rows option
It looks like you can have a rows
option smaller than Terminal.rows
But I find the cursor position restoration will be pointless if you set it like that.
That said, you have a 6 * 3 terminal, the cursor is on line 1, text in line 2
----------
| _ |
| 123 |
| |
----------
_ cursor
123 text
And you serialize with rows
1, and you restore it.
You now get one line 123
.
----------
| 123 |
| |
| |
----------
_ cursor
123 text
But where should you place the cursor? The cursor position(on the top of 123) is out of screen now.
The rows
interface with the isWrapped
If the isWrapped is considered in serialization (concat the next line to first one if they are the same line that got wrapped).
- whether the concatenated line counted as
2
line or1
line? - How should the terminal be serialized when a wrapped line is cropped by the
rows
option?
The coordinate of cursor.
How should the cursor position restored?
If you write the result into different sized terminal
.
The cursor position may looks pointless in one of the way (depends on usage).
- By relative position
move 1 row down, move 1 col right from the last word in the result. - By absolute screen space position
move to screen postion 4, 8. - Does not matter because the result isn't designed to write into terminal that have different size.