mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
web - preserve pathname in URL when opening windows or changing workspaces
This commit is contained in:
@@ -241,7 +241,7 @@ 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 {
|
||||
@@ -249,7 +249,7 @@ export class SimpleWindowService extends Disposable implements IWindowService {
|
||||
}
|
||||
}
|
||||
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 {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user