Xterm.js: Strange column behavior in bash

Created on 1 Sep 2016  路  16Comments  路  Source: xtermjs/xterm.js

@rebornix was able to reproduce this strange behavior:

image

Details

  • Browser and browser version: Within vscode v1.5.0 Insiders
  • OS version: OSX
  • xterm.js version: 220828f

    Steps to reproduce

  1. Run ls

Notice the 4th column (Pictures) is being pushed way out to the right. Inspecting the element shows many   characters before the P on the first line. Running this command on iterm showed the 4 columns correctly spaces.

typbug

All 16 comments

Hey @Tyriar, I tried to reproduce but couldn't on VSCode 1.4.0 (same specs as the one reported).

Is there a way to get the 1.5.0 Insiders to test there as well?

You can grab the Insiders build at http://code.visualstudio.com/insiders

Thanks @Tyriar - I can confirm this happens but after changing the terminal height, this stops happening. I guess that's an initialization issue in VSCode and not an Xterm.js issue. Could you please check?

@akalipetis I inspected it the DOM and it seems like way too many  's are being created which make the awkward column sizes. Regardless of terminal dimensions, should the columns be spaced evenly?

Yes, they should be spaced evenly. They should take this from the initial geometry, which might be problematic in such case. Could you please try doing a xterm.fit() after the terminal is initialized? This should fix the issue.

@Tyriar did you give a try to fit after terminal initialization? Does this fix the issue?

I haven't had time to look at this, we don't use the fit addon to do this though, this is what vscode does https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts#L306

I don't think this is important enough to mark v2, will leave it open until I can verify it's status with @rebornix

image
i have the same behavior.
but when i change the window size,it correctly
image

@dzy321 yeah that's exactly what I've been seeing, I've seen it since again. It seems difficult to reproduce, also I'm not sure I've repro'd it on anything other than a Mac. What OS are you on?

@Tyriar I use mac,chrome 53.0.2785.116.
i also use vscode 1.5.2,it has same issue
image

This does not happen to me neither on the demo using the latest version of master.

Could you please try the demo as well and let us know if this is still an issue there?

I can still repro:

VS Code:

screen shot 2017-01-17 at 11 04 37 am

Demo (Mac, 120 columns):

screen shot 2017-01-17 at 11 06 10 am

Here is what is sent from the pty process:

"AUTHORS            Procfile.dev        demo            lib         tsconfig.json
CONTRIBUTING.md     README.md       dist            node_modules        tslint.json
Dockerfile      bin         docker-compose.yaml out         typings.json
LICENSE         bower.json      gulpfile.js     package.json
"

Looks like this could be related to tab stops not working correctly?

I think it's happening due to crazy nextStop logic. I added an impl of what I would expect it to be and it works just fine, I need to read up on spec though to see if this is correct.

screen shot 2017-01-20 at 2 11 20 pm

Oh, it breaks because setupStops is not called in the right spot during a resize.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pfitzseb picture pfitzseb  路  3Comments

circuitry2 picture circuitry2  路  4Comments

goxr3plus picture goxr3plus  路  3Comments

tandatle picture tandatle  路  3Comments

fabiospampinato picture fabiospampinato  路  4Comments