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

Integrated terminal does not line wrap when prompt string contains emojis #44340

Closed
martypdx opened this issue Feb 24, 2018 · 12 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) help wanted Issues identified as good community contribution opportunities terminal Integrated terminal issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@martypdx
Copy link

This started with latest release

  • VSCode Version: Version 1.20.1 (1.20.1)
  • OS Version: OSX 10.13.3 (17D47)

Steps to Reproduce:

  1. Open integrated terminal
  2. Type text past the end of line and it wraps to same line.

Does this issue occur when all extensions are disabled?: Yes

vscode-terminal-wrap-issue-original

@vscodebot
Copy link

vscodebot bot commented Feb 24, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Feb 24, 2018
@Tyriar
Copy link
Member

Tyriar commented Feb 24, 2018

@martypdx can you share your $PS1 variable? Run echo $PS1 in the terminal to get it

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Feb 24, 2018
@martypdx
Copy link
Author

@Tyriar:

📂 rehype-add-classes 🚀 echo $PS1
📂 \W 🚀

@martypdx
Copy link
Author

It's the pictorial unicode 📂 🚀

@martypdx martypdx changed the title Integrated terminal does not go to new line on wrap Integrated terminal does not line wrap when prompt string contains emojis Feb 25, 2018
@Tyriar
Copy link
Member

Tyriar commented Mar 6, 2018

@martypdx does this happen in an external terminal when the width is set the same? It looks like all the terminal is doing here is following instructions from bash, and bash is not saying to go the next line.

@martypdx
Copy link
Author

martypdx commented Mar 7, 2018

@Tyriar works fine in external terminal. Worked in prior release of VSCode.

@Tyriar
Copy link
Member

Tyriar commented Mar 7, 2018

@martypdx hmm, maybe the shell thinks it's wider than the terminal for some reason then? If you keep typing will it eventually wrap?

Also you could try test it in Insiders as a lot has changed with regards to layout in the terminal since 1.20 due to the introduction of splitting. https://code.visualstudio.com/insiders/

@martypdx
Copy link
Author

martypdx commented Mar 9, 2018

@Tyriar:

If you keep typing will it eventually wrap?

Yes, the second time around it wraps and subsequent lines wrap correct.

could try test it in Insiders

Problem still exists in Insiders :(

maybe the shell thinks it's wider than the terminal

But it only happens with certain characters in $PS1. Perhaps it's checking for certain character ranges and it needs to be broadened?

@Tyriar
Copy link
Member

Tyriar commented Mar 9, 2018

I now there's an issue with emojis right now if you add one to the prompt and delete it, this could be related to that?

@martypdx
Copy link
Author

@Tyriar Yeah, looks like if you paste an emoji and then hit backspace/delete it removes two characters. I have seen other off-by-one behavior like this as well.

vscode-44340

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) help wanted Issues identified as good community contribution opportunities and removed info-needed Issue requires more information from poster labels Mar 23, 2018
@Tyriar
Copy link
Member

Tyriar commented Mar 23, 2018

This is a bug in https://github.com/xtermjs/xterm.js, I don't think there's a tracking issue currently.

@Tyriar
Copy link
Member

Tyriar commented Jun 22, 2018

The original report where there is an issue with wrapping I believe is a problem with bash. For backspace this is tracked in xtermjs/xterm.js#1059

@Tyriar Tyriar closed this as completed Jun 22, 2018
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 22, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 6, 2018
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 *duplicate Issue identified as a duplicate of another issue(s) help wanted Issues identified as good community contribution opportunities terminal Integrated terminal issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants