Use client's OS for keybindings

Fixes https://github.com/codercom/frontend/issues/331.
This commit is contained in:
Asher 2019-02-27 15:11:04 -06:00
parent 676b30934f
commit 68cb19ab6f
No known key found for this signature in database
GPG Key ID: 7BB4BA9C783D2BBC
1 changed files with 2 additions and 1 deletions

View File

@ -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));