mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-08 11:24:11 +01:00
Fix missing ancestor modes in :listkeys, recognize paths like c:/ on Windows®, and elide redundant -group=user in :style serialization.
This commit is contained in:
@@ -1296,7 +1296,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
return urls.map(function (url) {
|
return urls.map(function (url) {
|
||||||
url = url.trim();
|
url = url.trim();
|
||||||
|
|
||||||
if (/^(\.{0,2}|~)(\/|$)/.test(url)) {
|
if (/^(\.{0,2}|~)(\/|$)/.test(url) || util.OS.isWindows && /^[a-z]:/i.test(url)) {
|
||||||
try {
|
try {
|
||||||
// Try to find a matching file.
|
// Try to find a matching file.
|
||||||
let file = io.File(url);
|
let file = io.File(url);
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ var Mappings = Module("mappings", {
|
|||||||
iterate: function (args, mainOnly) {
|
iterate: function (args, mainOnly) {
|
||||||
let modes = [this.getMode(args)];
|
let modes = [this.getMode(args)];
|
||||||
if (!mainOnly)
|
if (!mainOnly)
|
||||||
modes = modes.concat(modes[0].bases);
|
modes = modes.concat(modes[0].allBases);
|
||||||
|
|
||||||
let seen = {};
|
let seen = {};
|
||||||
// Bloody hell. --Kris
|
// Bloody hell. --Kris
|
||||||
|
|||||||
@@ -992,7 +992,10 @@ unlet s:cpo_save
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!match || match.scheme === "resource" && match.path)
|
if (!match || match.scheme === "resource" && match.path)
|
||||||
if (/^(\.{0,2}|~)\/|^file:/.test(context.filter) || util.getFile(context.filter) || io.isJarURL(context.filter))
|
if (/^(\.{0,2}|~)\/|^file:/.test(context.filter)
|
||||||
|
|| util.OS.isWindows && /^[a-z]:/i.test(url)
|
||||||
|
|| util.getFile(context.filter)
|
||||||
|
|| io.isJarURL(context.filter))
|
||||||
completion.file(context, full);
|
completion.file(context, full);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -609,9 +609,8 @@ var Styles = Module("Styles", {
|
|||||||
command: "style",
|
command: "style",
|
||||||
arguments: [style.sites.join(",")],
|
arguments: [style.sites.join(",")],
|
||||||
literalArg: style.css,
|
literalArg: style.css,
|
||||||
options: update({
|
options: update(
|
||||||
"-group": hive.name,
|
hive.name == "user" ? {} : { "-group": hive.name },
|
||||||
},
|
|
||||||
style.name ? { "-name": style.name } : {})
|
style.name ? { "-name": style.name } : {})
|
||||||
})))
|
})))
|
||||||
.flatten().array
|
.flatten().array
|
||||||
|
|||||||
Reference in New Issue
Block a user