mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 08:15:56 +01:00
hide inline chat affordance when editor loses focus (#299716)
Fixes #299616
This commit is contained in:
@@ -120,6 +120,13 @@ export class InlineChatAffordance extends Disposable {
|
||||
selectionData.set(undefined, undefined);
|
||||
}));
|
||||
|
||||
// Hide when the editor loses focus (e.g., switching tabs in notebooks)
|
||||
this._store.add(autorun(r => {
|
||||
if (!editorObs.isFocused.read(r)) {
|
||||
selectionData.set(undefined, undefined);
|
||||
}
|
||||
}));
|
||||
|
||||
this._store.add(autorun(r => {
|
||||
const sel = selectionData.read(r);
|
||||
const mode = affordance.read(r);
|
||||
|
||||
Reference in New Issue
Block a user