mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 21:28:00 +01:00
Fix some recent bugs in the special casing of :!.
This commit is contained in:
@@ -1087,12 +1087,15 @@ var Commands = Module("commands", {
|
|||||||
str.replace(/\s*".*$/, "");
|
str.replace(/\s*".*$/, "");
|
||||||
|
|
||||||
let matches = this.commandRegexp.exec(str);
|
let matches = this.commandRegexp.exec(str);
|
||||||
if (!matches || !matches[4])
|
if (!matches)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
let [, spec, prespace, count, cmd, bang, space, args] = matches;
|
let [, spec, prespace, count, cmd, bang, space, args] = matches;
|
||||||
if (/\w/.test(cmd) && args && !(space || args[0] == "|"))
|
if (!cmd && bang)
|
||||||
args = null;
|
[cmd, bang] = [bang, cmd];
|
||||||
|
|
||||||
|
if (!cmd || args && args[0] != "|" && !(space || cmd == "!"))
|
||||||
|
return [];
|
||||||
|
|
||||||
// parse count
|
// parse count
|
||||||
if (count)
|
if (count)
|
||||||
|
|||||||
Reference in New Issue
Block a user