Skip to content

Commit 813504e

Browse files
committed
fix #651 don't switch to File Explorer view when opening one from ObjectScript Explorer
1 parent b229fbe commit 813504e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ export async function checkConnection(clearCookies = false, uri?: vscode.Uri): P
336336
checkingConnection = false;
337337
setTimeout(() => {
338338
explorerProvider.refresh();
339-
if (uri && schemas.includes(uri.scheme)) {
339+
// Refreshing Files Explorer also switches to it, so only do this if the uri is part of the workspace,
340+
// otherwise files opened from ObjectScript Explorer (objectscript:// or isfs:// depending on the "objectscript.serverSideEditing" setting)
341+
// will cause an unwanted switch.
342+
if (uri && schemas.includes(uri.scheme) && vscode.workspace.getWorkspaceFolder(uri)) {
340343
vscode.commands.executeCommand("workbench.files.action.refreshFilesExplorer");
341344
}
342345
}, 20);

0 commit comments

Comments
 (0)