Show IDE diff options in both panes (#5986)
This commit is contained in:
parent
2548facc79
commit
8dd6f04199
|
@ -214,10 +214,18 @@ export class DiffManager {
|
|||
}
|
||||
|
||||
private async onActiveEditorChange(editor: vscode.TextEditor | undefined) {
|
||||
const isVisible =
|
||||
!!editor &&
|
||||
editor.document.uri.scheme === DIFF_SCHEME &&
|
||||
this.diffDocuments.has(editor.document.uri.toString());
|
||||
let isVisible = false;
|
||||
if (editor) {
|
||||
isVisible = this.diffDocuments.has(editor.document.uri.toString());
|
||||
if (!isVisible) {
|
||||
for (const document of this.diffDocuments.values()) {
|
||||
if (document.originalFilePath === editor.document.uri.fsPath) {
|
||||
isVisible = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
await vscode.commands.executeCommand(
|
||||
'setContext',
|
||||
'gemini.diff.isVisible',
|
||||
|
|
Loading…
Reference in New Issue