mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-05 14:05:45 +01:00
Fix minefield.
This commit is contained in:
@@ -591,7 +591,7 @@ function curry(fn, length, self, acc) {
|
||||
if (args.length == 0)
|
||||
return close(self || this, curried);
|
||||
|
||||
let args = acc.concat(args);
|
||||
args = acc.concat(args);
|
||||
|
||||
if (args.length >= length)
|
||||
return fn.apply(self || this, args);
|
||||
|
||||
@@ -540,7 +540,7 @@ var Buffer = Module("Buffer", {
|
||||
let { dactyl } = this.modules;
|
||||
|
||||
let doc = elem.ownerDocument;
|
||||
let win = doc.defaultView;
|
||||
win = doc.defaultView;
|
||||
let { left: offsetX, top: offsetY } = elem.getBoundingClientRect();
|
||||
|
||||
if (isinstance(elem, [Ci.nsIDOMHTMLFrameElement,
|
||||
@@ -560,8 +560,6 @@ var Buffer = Module("Buffer", {
|
||||
return;
|
||||
}
|
||||
|
||||
let { dactyl } = this.modules;
|
||||
|
||||
let ctrlKey = false, shiftKey = false;
|
||||
let button = 0;
|
||||
switch (dactyl.forceTarget || where) {
|
||||
@@ -941,7 +939,7 @@ var Buffer = Module("Buffer", {
|
||||
if (win && (win.scrollMaxX > 0 || win.scrollMaxY > 0))
|
||||
return win;
|
||||
|
||||
let win = this.focusedFrame;
|
||||
win = this.focusedFrame;
|
||||
if (win && (win.scrollMaxX > 0 || win.scrollMaxY > 0))
|
||||
return win;
|
||||
|
||||
|
||||
@@ -521,7 +521,7 @@ var CommandHive = Class("CommandHive", Contexts.Hive, {
|
||||
return { map: map, specs: specs };
|
||||
});
|
||||
|
||||
let cached = cache.get(this.cacheKey);
|
||||
cached = cache.get(this.cacheKey);
|
||||
if (this.cached) {
|
||||
this._specs = cached.specs;
|
||||
for (let [k, v] in Iterator(cached.map))
|
||||
@@ -765,8 +765,8 @@ var Commands = Module("commands", {
|
||||
// TODO: allow matching of aliases?
|
||||
function cmds(hive) hive._list.filter(cmd => cmd.name.startsWith(filter || ""))
|
||||
|
||||
let hives = (hives || this.userHives).map(h => [h, cmds(h)])
|
||||
.filter(([h, c]) => c.length);
|
||||
hives = (hives || this.userHives).map(h => [h, cmds(h)])
|
||||
.filter(([h, c]) => c.length);
|
||||
|
||||
let list = ["table", {},
|
||||
["tr", { highlight: "Title" },
|
||||
@@ -989,6 +989,7 @@ var Commands = Module("commands", {
|
||||
|
||||
try {
|
||||
|
||||
let count, arg, quote, error;
|
||||
var { allowUnknownOptions, argCount, complete, extra, hereDoc, literal, options, keepQuotes } = params;
|
||||
|
||||
if (!options)
|
||||
@@ -1006,7 +1007,7 @@ var Commands = Module("commands", {
|
||||
|
||||
// FIXME: best way to specify these requirements?
|
||||
var onlyArgumentsRemaining = allowUnknownOptions || options.length == 0; // after a -- has been found
|
||||
var arg = null;
|
||||
arg = null;
|
||||
var i = 0;
|
||||
var completeOpts;
|
||||
|
||||
@@ -1176,7 +1177,7 @@ var Commands = Module("commands", {
|
||||
}
|
||||
|
||||
// if not an option, treat this token as an argument
|
||||
let [count, arg, quote, error] = getNextArg(sub);
|
||||
[count, arg, quote, error] = getNextArg(sub);
|
||||
util.assert(!error, error);
|
||||
|
||||
if (complete) {
|
||||
|
||||
@@ -985,7 +985,7 @@ var Completion = Module("completion", {
|
||||
},
|
||||
|
||||
addUrlCompleter: function addUrlCompleter(name, description, completer, ...args) {
|
||||
let completer = Completion.UrlCompleter(name, description, completer);
|
||||
completer = Completion.UrlCompleter(name, description, completer);
|
||||
completer.args = args;
|
||||
this.urlCompleters[name] = completer;
|
||||
},
|
||||
|
||||
@@ -278,7 +278,7 @@ var Contexts = Module("contexts", {
|
||||
}
|
||||
|
||||
let path = isRuntime ? file.getRelativeDescriptor(isRuntime) : file.path;
|
||||
let name = isRuntime ? path.replace(/^(plugin|color)s([\\\/])/, "$1$2") : "script-" + path;
|
||||
name = isRuntime ? path.replace(/^(plugin|color)s([\\\/])/, "$1$2") : "script-" + path;
|
||||
|
||||
if (!group)
|
||||
group = this.addGroup(commands.nameRegexp
|
||||
@@ -307,8 +307,8 @@ var Contexts = Module("contexts", {
|
||||
if (uri instanceof Ci.nsIFileURL)
|
||||
var file = File(uri.file);
|
||||
|
||||
let isPlugin = io.getRuntimeDirectories("plugins")
|
||||
.find(dir => dir.contains(file, true));
|
||||
isPlugin = io.getRuntimeDirectories("plugins")
|
||||
.find(dir => dir.contains(file, true));
|
||||
|
||||
let name = isPlugin && file && file.getRelativeDescriptor(isPlugin)
|
||||
.replace(File.PATH_SEP, "-");
|
||||
|
||||
@@ -380,7 +380,7 @@ var Help = Module("Help", {
|
||||
addDataEntry(file + ".xhtml", data.join(""));
|
||||
}
|
||||
|
||||
let data = [h for (h in highlight) if (styles.has(h.class) || /^Help/.test(h.class))]
|
||||
data = [h for (h in highlight) if (styles.has(h.class) || /^Help/.test(h.class))]
|
||||
.map(h => h.selector
|
||||
.replace(/^\[.*?=(.*?)\]/, ".hl-$1")
|
||||
.replace(/html\|/g, "") + "\t" + "{" + h.cssText + "}")
|
||||
|
||||
Reference in New Issue
Block a user