coq-community / vsc-conceal

Prettify Symbols Mode for Visual Studio Code [maintainer=@rtetley]
MIT License
54 stars 6 forks source link

Symbols appear at random places #2

Open AlexanderZeilmann opened 4 years ago

AlexanderZeilmann commented 4 years ago

As mentioned in the issues https://github.com/siegebell/vsc-prettify-symbols-mode/issues/42 and https://github.com/siegebell/vsc-prettify-symbols-mode/issues/53 of the original vsc-prettify-symbols-mode, symbols sometimes appear at random places. This bug sadly also exists in conceal.

As far as I can tell, the symbols that appear randomly are actually present somewhere else in the file. So it is not random symbols, but only a random placement.

Interestingly, the random symbols often also appear in files that should not be touched at all. For example, I configured conceal to only do substitutions in *.tex files, however, I also get substitutions in my settings.json.

Maybe the same bug, maybe not: Using a configuration like

{
    "ugly": "\\\\Omega",
    "pretty": "Ω",
    "post": "\\b|_"
}

sometimes leads to the partial substitution, where \Omega is substituted by \Ωmega, where only the O is replaced by an Ω.

So far I do not know what triggers the bug. But it appears very often when working on files for some time. The issues sadly cannot be fixed by disabling and enabling conceal.

I am using conceal 0.2.3 and the latest version of vsc:

Version: 1.47.3
Commit: 91899dcef7b8110878ea59626991a18c8a6a1b3e
Date: 2020-07-23T13:08:29.692Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.4.0
pancaek commented 4 years ago

This is indeed very strange, and probably the main bug of the repo I forked. It's gonna take some digging but I'll see if I can find anything

TyPR124 commented 3 years ago

Consider looking here: https://github.com/rfru/vsc-prettify-symbols-mode/commit/99f856848d17da93958db83842652c21326a5a0a#diff-898332678664790ddb753092948f301d3b040f2eb965f7a289194c768115a985L162-R167

Disclaimer: I claim no actual understanding of this code, just saw this in the network graph.

pancaek commented 3 years ago

Oooh interesting, I'll check this out, it seems promising

spaceunifyfifty commented 2 months ago

@TyPR124 @pancaek @rfru can anyone confirm if that commit on rfru's fork resolves this bug? https://github.com/rfru/vsc-prettify-symbols-mode/commit/99f856848d17da93958db83842652c21326a5a0a#diff-898332678664790ddb753092948f301d3b040f2eb965f7a289194c768115a985L162-R167