microsoft / vscode

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

editor.unicodeHighlight.ambiguousCharacters and editor.unicodeHighlight.invisibleCharacters do not correctly work only when opening VSCode #233503

Open adusamr opened 3 days ago

adusamr commented 3 days ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Copy and paste below text and save it as test.md (they are not usual ASCII characters)
    ABC DEF
  2. Close VSCode while opening test.md
  3. Open VSCode, then you see ABC DEF is highlighted
  4. Close 'test.md' (don't close VSCode) and reopen test.md
  5. ABC DEF highlight disappears

defaultSettings.json is like this:

{
    "editor.unicodeHighlight.ambiguousCharacters": true,
    "editor.unicodeHighlight.invisibleCharacters": true,
    "[markdown]":  {
        "editor.unicodeHighlight.ambiguousCharacters": false,
        "editor.unicodeHighlight.invisibleCharacters": false,
    }
}

ABCDEF are ambiguous characters and the space   is invisible character. So in .md file, ABC DEF should not be highlighted.

I posted another issue https://github.com/microsoft/vscode/issues/233505#issue-2646638314 regarding overwriting these settings in user settings. I don't know it is relating to this issue.

RedCMD commented 3 days ago

related #231224