microsoft / vscode

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

Toolbar Flickering When Switching Focus Changes #199303

Open hediet opened 10 months ago

hediet commented 10 months ago

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

Image

Image

benibenj commented 10 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.