microsoft / vscode

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

Ambiguous unicode character decoration shows in settings.json but doesn't explain on hover #168470

Open Tyriar opened 1 year ago

Tyriar commented 1 year ago

image

  "terminal.integrated.wordSeparators": " ()[]{}',\"─‘’",

The decoration doesn't show up all the time 🤷

image

hediet commented 1 year ago

Are you sure it is the same text in both cases?

I get highlighing here:

"terminal.integrated.wordSeparators": " ()[]{}',\"-‘’",

But not here:

"terminal.integrated.wordSeparators": " ()[]{}',\"─‘’",

The reason is that the system does not now that is confusable with an ASCII character (-). This is because the unicode confusable data is not very reliable (but we never claimed that this heuristic we use is safe - in untrusted workspaces both cases should be highlighted though, but there we highlight every non-ASCII character)