1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:47:58 +01:00

Fix some recent bugs in the special casing of :!.

This commit is contained in:
Kris Maglione
2010-12-31 16:25:40 -05:00
parent 9f7ef8634c
commit ce6d472a76

View File

@@ -1087,12 +1087,15 @@ var Commands = Module("commands", {
str.replace(/\s*".*$/, "");
let matches = this.commandRegexp.exec(str);
if (!matches || !matches[4])
if (!matches)
return [];
let [, spec, prespace, count, cmd, bang, space, args] = matches;
if (/\w/.test(cmd) && args && !(space || args[0] == "|"))
args = null;
if (!cmd && bang)
[cmd, bang] = [bang, cmd];
if (!cmd || args && args[0] != "|" && !(space || cmd == "!"))
return [];
// parse count
if (count)