Open mklement0 opened 3 years ago
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.
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).
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.
For reference, here's correct output from Windows Terminal:
On both macOS 10.15.7 and Ubuntu 18.04, the columns are misaligned: