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) {
|
private async onActiveEditorChange(editor: vscode.TextEditor | undefined) {
|
||||||
const isVisible =
|
let isVisible = false;
|
||||||
!!editor &&
|
if (editor) {
|
||||||
editor.document.uri.scheme === DIFF_SCHEME &&
|
isVisible = this.diffDocuments.has(editor.document.uri.toString());
|
||||||
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(
|
await vscode.commands.executeCommand(
|
||||||
'setContext',
|
'setContext',
|
||||||
'gemini.diff.isVisible',
|
'gemini.diff.isVisible',
|
||||||
|
|
Loading…
Reference in New Issue