microsoft / vscode

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

wordWrapColumn width calculation seems wrong for non-ASCII #94974

Closed deepestblue closed 4 years ago

deepestblue commented 4 years ago

Issue Type: Bug

  1. Set "editor.wordWrap": "wordWrapColumn", "editor.wordWrapColumn": 100,
  2. Set viewPort width to approximately 100
  3. Open long-running English text (e.g. attached English text in the Latin script) as a Plain Text file.
  4. Notice word wraps around the width of the viewport.
  5. Open long-running Tamil text (e.g. attached Tamil text) as "Plain Text" file.
  6. Notice Tamil text is wrapped well before it hits the viewport end (only about 80% the viewport used)

Also repros with Telugu and Devanagari text.

UDHR_Latin.txt

Latin

UDHR_Tamil.txt

Tamil

UDHR_Telugu.txt

Telugu

UDHR_Devanagari.txt

Devanagari

VS Code version: Code 1.44.0 (2aae1f26c72891c399f860409176fe435a154b13, 2020-04-08T08:23:56.137Z) OS version: Darwin x64 19.4.0

Extensions (9) Extension|Author (truncated)|Version ---|---|--- code-gnu-global|aus|0.2.2 vscode-markdownlint|Dav|0.34.0 jshint|dba|0.10.21 pgsql|dou|0.1.3 EditorConfig|Edi|0.14.5 vscode-clang|mit|0.2.3 python|ms-|2020.3.71659 cpptools|ms-|0.27.0 fontforge-vscode|xia|0.0.2 (1 theme extensions excluded)
alexdima commented 4 years ago

Please use "editor.wrappingStrategy": "advanced".