microsoft / vscode

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

Toolbar Flickering When Switching Focus Changes #199303

Open hediet opened 11 months ago

hediet commented 11 months ago

Might be related to when: ContextKeyExpr.has('isInDiffEditor'),

Image

Image

benibenj commented 11 months ago

The flicker happens because you are updating your context key in WorkbenchContextKeysHandler which is event driven and kicks in after the active editor has changed.

If you handle your context keys in your pane (TextDiffEditor) you won't run into this problem. This is how the Settings editor or the Keybindings editor do this for example.