Skip to content

Commit 68cb19a

Browse files
committed
Use client's OS for keybindings
Fixes https://github.com/codercom/frontend/issues/331.
1 parent 676b309 commit 68cb19a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vscode/src/fill/platform.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as os from "os";
22
import * as platform from "vs/base/common/platform";
3+
import * as browser from "vs/base/browser/browser";
34

45
// tslint:disable no-any to override const
56

@@ -22,4 +23,4 @@ if (platform.language === "en-US") {
2223

2324
// This is used for keybindings, and in one place to choose between \r\n and \n
2425
// (which we change to use platform.isWindows instead).
25-
(platform as any).OS = (platform.isMacintosh ? platform.OperatingSystem.Macintosh : (platform.isWindows ? platform.OperatingSystem.Windows : platform.OperatingSystem.Linux));
26+
(platform as any).OS = (browser.isMacintosh ? platform.OperatingSystem.Macintosh : (browser.isWindows ? platform.OperatingSystem.Windows : platform.OperatingSystem.Linux));

0 commit comments

Comments
 (0)