From 2d271e5e733d3efdb75b53711adffab4faff282f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 Nov 2021 17:18:35 -0800 Subject: [PATCH] Add vsls to openers For #136139 --- src/vs/base/common/network.ts | 5 +++++ src/vs/editor/browser/services/openerService.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts index b71e1d0bd8e8f..cf1a69a91bdab 100644 --- a/src/vs/base/common/network.ts +++ b/src/vs/base/common/network.ts @@ -96,6 +96,11 @@ export namespace Schemas { * Scheme used for temporary resources */ export const tmp = 'tmp'; + + /** + * Scheme used vs live share + */ + export const vsls = 'vsls'; } class RemoteAuthoritiesImpl { diff --git a/src/vs/editor/browser/services/openerService.ts b/src/vs/editor/browser/services/openerService.ts index 0a3b279612704..98f9ba4de1b65 100644 --- a/src/vs/editor/browser/services/openerService.ts +++ b/src/vs/editor/browser/services/openerService.ts @@ -131,7 +131,7 @@ export class OpenerService implements IOpenerService { // Default opener: any external, maito, http(s), command, and catch-all-editors this._openers.push({ open: async (target: URI | string, options?: OpenOptions) => { - if (options?.openExternal || matchesScheme(target, Schemas.mailto) || matchesScheme(target, Schemas.http) || matchesScheme(target, Schemas.https)) { + if (options?.openExternal || matchesScheme(target, Schemas.mailto) || matchesScheme(target, Schemas.http) || matchesScheme(target, Schemas.https) || matchesScheme(target, Schemas.vsls)) { // open externally await this._doOpenExternal(target, options); return true;