1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-23 20:13:31 +01:00

Fix Windows platform detection.

--HG--
extra : rebase_source : 22fa7cb45e3571c2fd4fe527121c50ceac249b25
This commit is contained in:
Doug Kearns
2010-09-22 17:36:04 +10:00
parent 60eac8d752
commit 542086159f
7 changed files with 20 additions and 24 deletions

View File

@@ -1155,12 +1155,6 @@ const Dactyl = Module("dactyl", {
}
},
// return the platform normalized to Vim values
getPlatformFeature: function () {
let platform = services.get("runtime").OS;
return /^Mac/.test(platform) ? "MacUnix" : platform == "Win32" ? "Win32" : "Unix";
},
// TODO: move this
getMenuItems: function () {
function addChildren(node, parent) {
@@ -1193,7 +1187,9 @@ const Dactyl = Module("dactyl", {
}
}, {
config: function () {
config.features.push(Dactyl.getPlatformFeature());
// TODO: is the OS really a config feature? I think not. --djk
let os = services.get("runtime").OS;
config.features.push(os == "WINNT" || os == "Darwin" ? os : "Unix");
},
// Only general options are added here, which are valid for all Dactyl extensions