1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 00:28:00 +01:00

Beep at failed key chains.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-28 04:58:56 -05:00
parent a0aebadc87
commit 032ba5fa50
3 changed files with 6 additions and 1 deletions

View File

@@ -1334,6 +1334,7 @@ var Commands = Module("commands", {
bang: args["-bang"], bang: args["-bang"],
count: args["-count"], count: args["-count"],
completer: completerFunc, completer: completerFunc,
literal: args["-count"] == "*" ? 0 : null,
persist: !args["-nopersist"], persist: !args["-nopersist"],
replacementText: args.literalArg, replacementText: args.literalArg,
sourcing: io.sourcing && update({}, io.sourcing) sourcing: io.sourcing && update({}, io.sourcing)

View File

@@ -61,7 +61,8 @@ var ProcessorStack = Class("ProcessorStack", {
result = res === Events.PASS ? Events.PASS : Events.KILL; result = res === Events.PASS ? Events.PASS : Events.KILL;
} }
else if (result !== Events.KILL && !this.actions.length && else if (result !== Events.KILL && !this.actions.length &&
this.processors.some(function (p) !p.main.passUnknown)) { (this.events.length > 1 ||
this.processors.some(function (p) !p.main.passUnknown))) {
result = Events.KILL; result = Events.KILL;
dactyl.beep(); dactyl.beep();
events.feedingKeys = false; events.feedingKeys = false;

View File

@@ -1246,6 +1246,9 @@ update(iter, {
* given predicate. * given predicate.
*/ */
nth: function nth(iter, pred, n, self) { nth: function nth(iter, pred, n, self) {
if (typeof pred === "number")
[pred, n] = [function () true, pred]; // Hack.
for (let elem in iter) for (let elem in iter)
if (pred.call(self, elem) && n-- === 0) if (pred.call(self, elem) && n-- === 0)
return elem; return elem;