microsoft / vscode

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

While entering the editor in Chinese and English, some overflowing English letters do not have word wrapping #206665

Open neville-studio opened 7 months ago

neville-studio commented 7 months ago

Type: Bug

  1. use markdown editor
  2. Split the editor view and preview view。
  3. Type some Chinese words and English, for example: "若关系模式R∈1NF,且每一个非主属性完全依赖于码,则关系模式R∈2NF" The letter "F" at the end of this line does not have word wrap while type in.

VS Code version: Code 1.87.0 (019f4d1419fbc8219a181fab7892ebccf7ee29a2, 2024-02-27T23:41:44.469Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i5-12500H (16 x 3110)| |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| |Load (avg)|undefined| |Memory (System)|31.69GB (20.40GB free)| |Process Argv|--crash-reporter-id 312cae00-019f-4238-8674-62dbb2a1eab3| |Screen Reader|no| |VM|0%|
Extensions (27) Extension|Author (truncated)|Version ---|---|--- arm-debugger|Arm|1.0.0 cmsis-csolution|Arm|1.27.1 device-manager|Arm|1.11.0 embedded-debug|Arm|1.0.13 environment-manager|Arm|1.1.8 keil-studio-pack|Arm|1.16.0 virtual-hardware|Arm|0.6.0 svd-viewer|cor|1.2.3 arm|dan|1.7.4 memory-inspector|ecl|1.0.1 peripheral-inspector|ecl|1.5.1 keil-vscode-assistant|jac|1.9.0 better-cpp-syntax|jef|1.17.2 keil-vscode|jiy|0.0.2 vscode-language-pack-zh-hans|MS-|1.87.2024022809 csdevkit|ms-|1.3.10 csharp|ms-|2.18.16 vscode-dotnet-runtime|ms-|2.0.2 vscodeintellicode-csharp|ms-|0.1.26 debugpy|ms-|2024.2.0 python|ms-|2024.2.1 vscode-pylance|ms-|2024.2.2 remote-wsl|ms-|0.86.0 cpptools|ms-|1.19.4 vscode-yaml|red|1.14.0 volar|Vue|2.0.0 markdown-all-in-one|yzh|3.6.2 (1 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:30899288 vscaat:30438848 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:30968132 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 d34g3935:30971562 edj9j583:30969295 fegfb526:30973843 bg6jg535:30958357 8f97e687:30977000 dsvsc020:30976470 ```
neville-studio commented 7 months ago

This is issue screenshots: image

neville-studio commented 7 months ago

Try these step, the word wrap also working abnormal. (I have disabled all of the extensions.)

  1. Open Visual Studio Code, and Create a new markdown file.
  2. Type the letter "∈" continuously.
  3. You will see the word wrap works abnormal. image
zhufengning commented 7 months ago

All lines with Chinese charactors wrap incorrectly 图片

aiday-mar commented 1 month ago

Hi I am currently looking at this issue. I noted the following points:

What I currently see is the following. Seems to be wrapped correctly when toggling the word wrap except for the line with the ∈ (interestingly this is wrapped correctly in TS files).

https://github.com/user-attachments/assets/df07405e-c22e-4fb4-be8f-5cc27cf89fad

@zhufengning can I ask you if you could share the example from the screen shot (or another example where this happens). Could you also let me know what are the values of the settings:

Did you toggle the command Toggle Word Wrap before the issue occured?

note to self: not fixed by experimental edit context, seems to be a purely UI issue.

zhufengning commented 4 weeks ago

@aiday-mar ~If I set the Editor: Word Wrap setting it is not respected in Markdown files. But Toggle Word Wrap works.~ After I upgraded to version 1.93.0, the related bugs no longer appeared.

aiday-mar commented 4 weeks ago

Hi @zhufengning thank you for confirming you do not see this bug.

@neville-studio can I ask you if you are still able to reproduce the initial bug in this issue?

I am not sure why the line with the repeated ∈ does not wrap correctly, whereas the other lines wrap correctly. @mjbvz I wonder if this is expected for Markdown files? I am asking since I can only reproduce this in MD files so far.

neville-studio commented 4 weeks ago

The bug still exists in v1.93.0. With the character image If you set the display language to Chinese(Simplified)(简体中文), The character will overflowed more. image

In setting.json, The editor.wordWrap item seems No use. I'm using View: Toggle Word Wrap Setting in Command Panel(Ctrl + Shift + P).

editor.wordWrapColumn=80
editor.wordWrap = [any]

Here are my all settings in my VS code, v1.93.0

{
    "cmake.configureOnOpen": true,
    "git.autofetch": true,
    "workbench.editorAssociations": {
        "*.md": "default"
    },
    "C_Cpp.intelliSenseEngine": "disabled",
    "github.copilot.editor.enableAutoCompletions": true,
    "diffEditor.hideUnchangedRegions.enabled": true,
    "json.schemas": [
        {
            "fileMatch": [
                "/.docx.json"
            ],
            "url": "https://raw.githubusercontent.com/Mehdi-Verfaillie/docx/main/src/config/.docx.schema.json"
        }
    ],
    "editor.wordWrap": "off",
    "editor.wordWrapColumn": 80
}
neville-studio commented 4 weeks ago

Character and has the same issue. image