mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 21:37:57 +01:00
Beep at failed key chains.
--HG-- branch : key-processing
This commit is contained in:
@@ -1334,6 +1334,7 @@ var Commands = Module("commands", {
|
||||
bang: args["-bang"],
|
||||
count: args["-count"],
|
||||
completer: completerFunc,
|
||||
literal: args["-count"] == "*" ? 0 : null,
|
||||
persist: !args["-nopersist"],
|
||||
replacementText: args.literalArg,
|
||||
sourcing: io.sourcing && update({}, io.sourcing)
|
||||
|
||||
@@ -61,7 +61,8 @@ var ProcessorStack = Class("ProcessorStack", {
|
||||
result = res === Events.PASS ? Events.PASS : Events.KILL;
|
||||
}
|
||||
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;
|
||||
dactyl.beep();
|
||||
events.feedingKeys = false;
|
||||
|
||||
@@ -1246,6 +1246,9 @@ update(iter, {
|
||||
* given predicate.
|
||||
*/
|
||||
nth: function nth(iter, pred, n, self) {
|
||||
if (typeof pred === "number")
|
||||
[pred, n] = [function () true, pred]; // Hack.
|
||||
|
||||
for (let elem in iter)
|
||||
if (pred.call(self, elem) && n-- === 0)
|
||||
return elem;
|
||||
|
||||
Reference in New Issue
Block a user