Fix opening snippets

This commit is contained in:
Asher 2019-07-12 19:09:07 -05:00
parent 8dcc1e3567
commit 68c62087dc
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 77 additions and 64 deletions

View File

@ -1,3 +1,16 @@
diff --git a/src/vs/editor/browser/services/openerService.ts b/src/vs/editor/browser/services/openerService.ts
index c175034f96..de7e29906a 100644
--- a/src/vs/editor/browser/services/openerService.ts
+++ b/src/vs/editor/browser/services/openerService.ts
@@ -53,7 +53,7 @@ export class OpenerService implements IOpenerService {
const { scheme, path, query, fragment } = resource;
- if (equalsIgnoreCase(scheme, Schemas.http) || equalsIgnoreCase(scheme, Schemas.https) || equalsIgnoreCase(scheme, Schemas.mailto)) {
+ if ((!location || location.host !== resource.authority) && equalsIgnoreCase(scheme, Schemas.http) || equalsIgnoreCase(scheme, Schemas.https) || equalsIgnoreCase(scheme, Schemas.mailto)) {
// open http or default mail application
dom.windowOpenNoOpener(encodeURI(resource.toString(true)));
return Promise.resolve(true);
diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts
index 443e430fcd..fdd9900598 100644
--- a/src/vs/platform/environment/common/environment.ts