Skip to content

Commit 212fc37

Browse files
authored
Removed some redundant code related to revealIfOpen setting (#13922)
1 parent 15dac43 commit 212fc37

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

Extension/src/LanguageServer/extension.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -478,21 +478,7 @@ async function onSwitchHeaderSource(): Promise<void> {
478478
}
479479
});
480480
const document: vscode.TextDocument = await vscode.workspace.openTextDocument(targetFileName);
481-
const workbenchConfig: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("workbench");
482-
let foundEditor: boolean = false;
483-
if (workbenchConfig.get("editor.revealIfOpen")) {
484-
// If the document is already visible in another column, open it there.
485-
vscode.window.visibleTextEditors.forEach(editor => {
486-
if (editor.document === document && !foundEditor) {
487-
foundEditor = true;
488-
void vscode.window.showTextDocument(document, editor.viewColumn).then(undefined, logAndReturn.undefined);
489-
}
490-
});
491-
}
492-
493-
if (!foundEditor) {
494-
void vscode.window.showTextDocument(document).then(undefined, logAndReturn.undefined);
495-
}
481+
void vscode.window.showTextDocument(document).then(undefined, logAndReturn.undefined);
496482
}
497483

498484
/**

0 commit comments

Comments
 (0)