microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.96k stars 29.18k forks source link

Zero width character highlighting broken for emojis containing ZWJs #202860

Open lucacasonato opened 9 months ago

lucacasonato commented 9 months ago

Type: Bug

In the following snippet, VS Code reports no ZWJ characters.

"πŸ§‘β€πŸ¦°"

In this snippet, VS Code reports an invisible char (ZWJ) right in front of the emoji.

"πŸ§‘β€πŸ¦°1"

Really, either both should report the ZWJ (bad), or neither (good). In both cases the ZWJ is part of a valid emoji sequence (Person + ZWJ + Red Hair).

image

VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:47:11.635Z) OS version: Linux x64 6.6.6-76060606-generic Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 9 5900X 12-Core Processor (24 x 3738)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|1, 1, 1| |Memory (System)|62.71GB (32.39GB free)| |Process Argv|--unity-launch --crash-reporter-id a03fc28b-9e8b-4dad-84b3-98190fa0feef| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|pop| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|pop| |XDG_SESSION_TYPE|x11|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 vsclangdc:30486549 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30933248 pythongtdpath:30769146 i26e3531:30792625 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 dsvsc019acf:30933242 ```
vscodenpa commented 9 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.85.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!