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

Extra space in terminal when using surrogate pair with oh-my-posh #230310

Closed
sharky98 opened this issue Oct 2, 2024 · 2 comments
Closed

Extra space in terminal when using surrogate pair with oh-my-posh #230310

sharky98 opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels
terminal-conpty Integrated terminal issues related to the ConPTY backend terminal-rendering upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream windows VS Code on Windows issues

Comments

@sharky98
Copy link

sharky98 commented Oct 2, 2024

Type: Bug

Describe the problem:

When I use a surrogate pair (such as \udb80\udced for the nf-md-calendar icon), there is an extra space before the trailing diamond and after the content of the segment that does not get styled.

See JanDeDobbeleer/oh-my-posh#5706 for original report.

To Reproduce:

Use a surrogate pair in any segment such as below.

{
  "blocks": [
      "segments": [
        {
          "background": "#234d70",
          "foreground": "#d6deeb",
          "leading_diamond": "<transparent,background>\ue0b0</>",
          "properties": {
            "time_format": "2006-01-02"
          },
          "style": "diamond",
          "template": " \udb80\udced {{ .CurrentDate | date .Format }} ",
          "trailing_diamond": "<background,transparent>\ue0b0</>",
          "type": "time"
        },
    ]
  ]
}

VS Code version: Code 1.93.1 (38c31bc, 2024-09-11T17:20:05.685Z)
OS version: Windows_NT x64 10.0.22631
Modes: Restricted

System Info
Item Value
CPUs AMD Ryzen 9 5900X 12-Core Processor (24 x 3700)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.93GB (21.24GB free)
Process Argv --disable-extensions --crash-reporter-id 247a7cb8-99a8-4524-ab7d-25bc9c85902f
Screen Reader no
VM 0%
Extensions disabled
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
0ee40948:31013168
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
flighttreat:31134774
wkspc-onlycs-t:31132770
nativeloc1:31134641
wkspc-ranged-t:31125599
cf971741:31144450
defaultse:31146405
iacca2:31150323
notype1:31150297
cc771715:31146322

@meganrogge meganrogge added upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream terminal-rendering labels Oct 2, 2024
@sharky98
Copy link
Author

sharky98 commented Oct 5, 2024

After investigating with a xterm.js member, it turns out that the issue lies in Windows providing system32\conhost.exe instead of the more recent OpenConsole.exe installed with Windows Terminal.

I saw an experimental options ("terminal.integrated.experimental.windowsUseConptyDll": true) that would use a bundled OpenConsole.exe. But, having already Windows Terminal installed, isn't there a way to make use of the provided OpenConsole.exe (when available) instead of using a bundled one?

xtermjs/xterm.js#5185

@meganrogge meganrogge removed their assignment Dec 10, 2024
@Tyriar
Copy link
Member

Tyriar commented Dec 10, 2024

This issue seems to originate from an upstream component and is not something VSCode can fix by making a change to our code. As such, I will go ahead and close it. Please try to reproduce in Windows Terminal and report to microsoft/terminal with repro steps.

If you cannot reproduce in Windows Terminal, chances are it's fixed in a later version of Windows. You can read more about how we consume conpty here. Additionally, soon we plan on shipping conpty v2 with VS Code which should bring our behavior in line with Windows Terminal. Thanks for understanding.

/label upstream terminal-conpty windows

@Tyriar Tyriar closed this as completed Dec 10, 2024
@vs-code-engineering vs-code-engineering bot added terminal-conpty Integrated terminal issues related to the ConPTY backend windows VS Code on Windows issues labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal-conpty Integrated terminal issues related to the ConPTY backend terminal-rendering upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

3 participants