Skip to content

Commit

Permalink
web - preserve pathname in URL when opening windows or changing works…
Browse files Browse the repository at this point in the history
…paces
  • Loading branch information
bpasero committed Sep 18, 2019
1 parent cd0f833 commit bbb56db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/browser/web.simpleservices.ts
Expand Up @@ -241,15 +241,15 @@ export class SimpleWindowService extends Disposable implements IWindowService {
for (let i = 0; i < _uris.length; i++) {
const uri = _uris[i];
if ('folderUri' in uri) {
const newAddress = `${document.location.origin}/?folder=${uri.folderUri.path}`;
const newAddress = `${document.location.origin}${document.location.pathname}?folder=${uri.folderUri.path}`;
if (openFolderInNewWindow) {
window.open(newAddress);
} else {
window.location.href = newAddress;
}
}
if ('workspaceUri' in uri) {
const newAddress = `${document.location.origin}/?workspace=${uri.workspaceUri.path}`;
const newAddress = `${document.location.origin}${document.location.pathname}?workspace=${uri.workspaceUri.path}`;
if (openFolderInNewWindow) {
window.open(newAddress);
} else {
Expand Down
Expand Up @@ -51,7 +51,7 @@ class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient i
openExtensionDevelopmentHostWindow(args: ParsedArgs, env: IProcessEnvironment): Promise<void> {
// we pass the "ParsedArgs" as query parameters of the URL

let newAddress = `${document.location.origin}/?`;
let newAddress = `${document.location.origin}${document.location.pathname}?`;
let gotFolder = false;

const addQueryParameter = (key: string, value: string) => {
Expand Down

0 comments on commit bbb56db

Please sign in to comment.