microsoft / vscode

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

Background color of strings flashes #129301

Closed realh closed 3 years ago

realh commented 3 years ago

Issue Type: Bug

When editing a string in part of a Typescript source file, the background color of the string keeps flashing between the default background color and a lighter shade of grey, apparently at random. This is extremely obnoxious on large multiline strings.

I'm using the standard Dark+ theme. I also use the vim extension, but it doesn't seem to matter whether I'm in Insert or Normal mode, or even disable the extension completely.

VS Code version: Code 1.58.2 (c3f126316369cd610563c75b1b1725e0679adfb3, 2021-07-14T22:30:16.440Z) OS version: Linux x64 5.12.15-arch1-1 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz (4 x 2600)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|1, 1, 1| |Memory (System)|7.64GB (1.95GB free)| |Process Argv|--no-sandbox --unity-launch --crash-reporter-id f284bc02-8148-43a2-b910-cc5852739e93| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|gnome| |XDG_CURRENT_DESKTOP|GNOME| |XDG_SESSION_DESKTOP|gnome| |XDG_SESSION_TYPE|wayland|
Extensions (29) Extension|Author (truncated)|Version ---|---|--- vscode-styled-jsx|bla|2.0.0 vscode-modelines|chr|2.0.5 vscode-eslint|dba|2.1.23 vscode-html-css|ecm|1.10.2 tslint|eg2|1.0.47 auto-close-tag|for|0.5.11 dotenv|mik|1.0.1 vscode-language-pack-en-GB|MS-|1.54.1 python|ms-|2021.7.1060902895 vscode-pylance|ms-|2021.7.5 jupyter|ms-|2021.8.1054968649 remote-containers|ms-|0.187.1 remote-ssh|ms-|0.65.7 remote-ssh-edit|ms-|0.65.7 remote-wsl|ms-|0.58.2 vscode-remote-extensionpack|ms-|0.21.0 cpptools|ms-|1.5.1 java|red|0.80.0 lit-plugin|run|1.2.1 sourcekit-lsp|unp|0.0.1 vscodeintellicode|Vis|1.2.14 vscode-java-debug|vsc|0.34.0 vscode-java-dependency|vsc|0.18.5 vscode-java-pack|vsc|0.17.0 vscode-java-test|vsc|0.30.1 vscode-maven|vsc|0.31.0 vim|vsc|1.21.5 viml|Xad|1.0.1 html-css-class-completion|Zig|1.20.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551cf:30311713 vspre833:30321513 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscus158:30321503 pythonvsuse255:30340121 vscod805:30301674 pythonvspyt200:30340761 vscextlangct:30333562 binariesv615:30325510 pythonvssor306cf:30341832 bridge0708:30335490 ```
realh commented 3 years ago

Screencast of the flashing:

https://user-images.githubusercontent.com/8783151/126874753-53d2f82e-5a17-4764-a559-bb156ab7bc5c.mp4

IllusionMH commented 3 years ago

/needsMoreInfo

Is it only when you have cursor inside this string (probably in word)? Is it reproducible if you set "editor.occurrencesHighlight": false?

Most likely duplicate of https://github.com/microsoft/TypeScript/issues/43292

realh commented 3 years ago

"editor.occurrencesHighlight": false fixes it for me, thanks. This does seem to be the same as microsoft/TypeScript#43292 but I couldn't find it because I didn't know the cause of the problem and thus the best keywords for searching.