Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal: moving panel right leaves prompt in weird place #94501

Closed
bpasero opened this issue Apr 6, 2020 · 14 comments
Closed

Terminal: moving panel right leaves prompt in weird place #94501

bpasero opened this issue Apr 6, 2020 · 14 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Apr 6, 2020

This was running out of sources:

image

@Tyriar
Copy link
Member

Tyriar commented Apr 6, 2020

I can't repro on macOS with bash or zsh. What state was the terminal in before you moved it?

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Apr 6, 2020
@bpasero
Copy link
Member Author

bpasero commented Apr 6, 2020

I am not sure, normal? This is after fresh start running out of master

Kapture 2020-04-06 at 14 16 11

@bpasero
Copy link
Member Author

bpasero commented Apr 6, 2020

Hm, cannot reproduce with a fresh user data dir. How can I debug this?

@Tyriar
Copy link
Member

Tyriar commented Apr 6, 2020

What I suspect is happening is that zsh is doing this as a reaction to the line size being reduced. This could be confirmed by enabling escape sequence logging https://github.com/microsoft/vscode/wiki/Terminal-Issues#enabling-escape-sequence-logging, that should log out how zsh reacts after the terminal resize happens.

You could also check what happens when reducing the window width while the panel is on the bottom.

@bpasero
Copy link
Member Author

bpasero commented Apr 6, 2020

@Tyriar yeah that seems to trigger it as well, just having smaller width for panel:

image

@bpasero
Copy link
Member Author

bpasero commented Apr 6, 2020

Output:

[Extension Host] debugger inspector at chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5870/901cda19-6248-4d63-a05a-b8cca71fde55
2/Users/bpasero/Development/Microsoft/monaco/node_modules/xterm/lib/xterm.js:1 xterm.js: parsing data 

�[0m�[27m�[24m�[J~/Documents/ticino-playground> 

image

@Tyriar
Copy link
Member

Tyriar commented Apr 6, 2020

Hmm I guess not then, that does the following:

[0m: clear char styles
[27m: do not invert colors
[24m: do not underline
[J: erase current line and below
Reprint prompt

If you inspect the element does the terminal container fill the view? Does cmd+a select everthing?

@bpasero
Copy link
Member Author

bpasero commented Apr 6, 2020

Cmd+A

image

Inspect:

image

image

@bpasero
Copy link
Member Author

bpasero commented Apr 6, 2020

And I cannot fix it even when resizing:

Kapture 2020-04-06 at 19 45 22

@Tyriar
Copy link
Member

Tyriar commented Apr 6, 2020

😕

Ok so that tells us that xterm.js isn't resizing correctly. I just tried to repro again with all renderers but couldn't still. Does it change depending on the renderer you're using?

I did just made changes in this area in 5b0460a.

Could you try change these lines:

charHeight: xtermCore._renderService.dimensions.actualCellHeight,
charWidth: xtermCore._renderService.dimensions.actualCellWidth

To:

charHeight: xtermCore._charSizeService!.height!,
charWidth: xtermCore._charSizeService!.width!

And see if that fixes the problem?

@Tyriar Tyriar added this to the April 2020 milestone Apr 6, 2020
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues and removed info-needed Issue requires more information from poster labels Apr 6, 2020
@bpasero
Copy link
Member Author

bpasero commented Apr 7, 2020

@Tyriar yes, that fixes it. Btw I am running with zoom level 1 always.

@Tyriar
Copy link
Member

Tyriar commented Apr 7, 2020

@bpasero thanks, I think that's the piece I was missing 😃

I can kind of reproduce, it's only down a little bit but that might be because of the font family or monitor size.

@Tyriar
Copy link
Member

Tyriar commented Apr 7, 2020

@bpasero hmm, maybe not... Could you debug and take a screenshot of the values of: xtermCore._charSizeService and xtermCore._renderService.dimensions?

@bpasero
Copy link
Member Author

bpasero commented Apr 7, 2020

Can you try with "terminal.integrated.lineHeight": 1.4,

@Tyriar Tyriar closed this as completed in 21213e5 Apr 7, 2020
@bpasero bpasero added the verified Verification succeeded label Apr 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants