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

Show-ParameterSetInfo: columns are misaligned on Unix-like platforms #146

Open
mklement0 opened this issue Apr 16, 2021 · 3 comments
Open
Labels
3rdPartyIssue 3rd party problem, awaiting upstream fix

Comments

@mklement0
Copy link

mklement0 commented Apr 16, 2021

For reference, here's correct output from Windows Terminal:

image

On both macOS 10.15.7 and Ubuntu 18.04, the columns are misaligned:

  • macOS (from Terminal.app; same in iTerm2.app)

image

  • Ubuntu

image

@plastikfan
Copy link
Collaborator

plastikfan commented Apr 16, 2021

Yeah, I know about this and this is an outstanding issue that is out of my control. This is caused by another issue(s) in xterm.js/xterm.js Issue 3304 and Issue 2568) which affects macOS/Linux and even vscode on windows. This misalignment occurs in vscode too, even on windows.

At the moment, I have a command Test-WinHostSupportsEmojis, which defaults to enabling emojis on Linux and macOS. I should probably default to not using emjois for Linux and macOS, until these types of issues have been fixed in xterm.js. So that is what I'll implement for this issue.

@christianparpart
Copy link

christianparpart commented May 30, 2021

Hi. I just stumbled across your ticked due to my personal interest in grapheme Cluster support in terminals and a small chat with @jerch. Personally i think WT is the only one doing it right in your above screenshots. If a TE renders an emoji symbol that one is too be treated as (East Asian) Wide character (i.e. double width = 2 cells).

While the TEs above seem to render correctly they do NOT position the cursor correctly. They increment the current column only by one instead of 2, therefore your app looks broken.

I think there is a future proof way to convince TE devs to do it like WT does (i think i will propose that in jerch's referenced ticked).

You can work around that btw by using tabstops instead of space characters to move your cursor forwards, so your app looks the same also in non supporting TEs.

If you need tabstops not equal to modulo 8, you can explicitly set tabstops upfront (TBC, HTS).

ref: https://vt100.net/docs/vt510-rm/HTS.html

@plastikfan
Copy link
Collaborator

thanks for your contribution @christianparpart. Looking at that vt100 page though doesnt mean anything to me yet. I have found this article on msdn Virtual Terminal Sequences, which hopefully enable me to make sense of how to apply the HTS as you recommend. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rdPartyIssue 3rd party problem, awaiting upstream fix
Projects
None yet
Development

No branches or pull requests

3 participants