From 68cb19ab6f67d4f9d6ab625333ddc59cc976420f Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 27 Feb 2019 15:11:04 -0600 Subject: [PATCH] Use client's OS for keybindings Fixes https://github.com/codercom/frontend/issues/331. --- packages/vscode/src/fill/platform.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vscode/src/fill/platform.ts b/packages/vscode/src/fill/platform.ts index d0fa1d66a..6aa9ff044 100644 --- a/packages/vscode/src/fill/platform.ts +++ b/packages/vscode/src/fill/platform.ts @@ -1,5 +1,6 @@ import * as os from "os"; import * as platform from "vs/base/common/platform"; +import * as browser from "vs/base/browser/browser"; // tslint:disable no-any to override const @@ -22,4 +23,4 @@ if (platform.language === "en-US") { // This is used for keybindings, and in one place to choose between \r\n and \n // (which we change to use platform.isWindows instead). -(platform as any).OS = (platform.isMacintosh ? platform.OperatingSystem.Macintosh : (platform.isWindows ? platform.OperatingSystem.Windows : platform.OperatingSystem.Linux)); +(platform as any).OS = (browser.isMacintosh ? platform.OperatingSystem.Macintosh : (browser.isWindows ? platform.OperatingSystem.Windows : platform.OperatingSystem.Linux));