Xterm.js: Data loss when resizing

Created on 25 Oct 2016  路  11Comments  路  Source: xtermjs/xterm.js

Resizing should preserve the existing text.

Details

  • Browser and browser version:
  • OS version: OSX 10.11
  • xterm.js version: 269540bfedc9fc4b160d75d15e54a2e07854f7e5

    Steps to reproduce

  1. Run the demo
  2. Reduce the column count
  3. Increase the column count and the original data is not restored.

Iterm2 handles this by reflowing the rows when you decrease the width.

screen shot 2016-10-25 at 2 22 25 pm

screen shot 2016-10-25 at 2 22 43 pm

vs.

screen shot 2016-10-25 at 2 23 48 pm

screen shot 2016-10-25 at 2 24 01 pm

screen shot 2016-10-25 at 2 24 11 pm

typbug

All 11 comments

Thanks for reporting @blink1073. Will take a deeper look on this.

I've been closing most of these in favor of https://github.com/sourcelair/xterm.js/issues/103 but they're technically different issues I guess. Let's use this to track not retaining characters off screen (Related request to support wrapping https://github.com/sourcelair/xterm.js/issues/166) and #103 to track only the prompt.

I've experienced the same errors as I am using xterm.js without a _"real"_ process (I am using https://github.com/skulpt/skulpt). I am just piping in my stdin and stdout streams.

I believe fixing this may fix some of the escape sequence tests. I think the reason t0021-CUB.in is failing for example is because the cursor position is reset to 0 after a line is wrapped but it should be cols.

@Tyriar Any input on when this resizing issue will be resolve?

@imsnif was handling this one. Still a WIP, see https://github.com/sourcelair/xterm.js/issues/404

Got it! Looking at it right now.

Still working on it! :)
I don't yet have an ETA, but am close to finishing a prototype (this is a very big change). Hoping to have more information on the weekend, but I don't want to make any promises.

@imsnif Any input on what you still need to do?

@ppot - in short: right now in my prototype resize, refresh and write are working with the external line index. There are some kinks I need to work out with them (including some performance issues) and then make sure all the other parts of the code work as well (eraseRight, etc.)

Then pull from upstream (I'm a little behind), write tests, clean everything up and we're good. Once I get the prototype to work (shouldn't be long now, I hope) I'll have a much clearer ETA of when the rest will be done.

Fixed by #616, thanks @LucianBuzzo!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

goxr3plus picture goxr3plus  路  3Comments

chris-tse picture chris-tse  路  4Comments

tandatle picture tandatle  路  3Comments

zhangjie2012 picture zhangjie2012  路  3Comments

circuitry2 picture circuitry2  路  4Comments