mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 22:28:00 +01:00
Fix regex filters for site-specific mappings.
--HG-- branch : key-processing
This commit is contained in:
@@ -324,7 +324,7 @@ var CommandMode = Class("CommandMode", {
|
|||||||
if (this.command || stack.pop && commandline.command) {
|
if (this.command || stack.pop && commandline.command) {
|
||||||
this.onChange(commandline.command);
|
this.onChange(commandline.command);
|
||||||
if (this.completions)
|
if (this.completions)
|
||||||
this.completions.autocompleteTimer.flush(true);
|
this.completions.complete(true, false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -311,8 +311,8 @@ var Styles = Module("Styles", {
|
|||||||
matchFilter: function (filter) {
|
matchFilter: function (filter) {
|
||||||
if (filter === "*")
|
if (filter === "*")
|
||||||
var test = function test(uri) true;
|
var test = function test(uri) true;
|
||||||
else if (filter[0] == "^") {
|
else if (filter[0] === "^") {
|
||||||
let re = RegExp(filter[0]);
|
let re = RegExp(filter);
|
||||||
test = function test(uri) re.test(uri.spec);
|
test = function test(uri) re.test(uri.spec);
|
||||||
}
|
}
|
||||||
else if (/[*]$/.test(filter)) {
|
else if (/[*]$/.test(filter)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user