mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-02 22:35:44 +01:00
Fix finder.
This commit is contained in:
@@ -168,7 +168,7 @@ const Finder = Module("finder", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// set searchString, searchPattern, caseSensitive, linksOnly
|
// set searchString, searchPattern, caseSensitive, linksOnly
|
||||||
processUserPattern: function (pattern) {
|
_processUserPattern: function (pattern) {
|
||||||
//// strip off pattern terminator and offset
|
//// strip off pattern terminator and offset
|
||||||
//if (backwards)
|
//if (backwards)
|
||||||
// pattern = pattern.replace(/\?.*/, "");
|
// pattern = pattern.replace(/\?.*/, "");
|
||||||
@@ -372,17 +372,17 @@ const Finder = Module("finder", {
|
|||||||
clear: function () {
|
clear: function () {
|
||||||
this._highlighter.clear();
|
this._highlighter.clear();
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
}, {
|
}, {
|
||||||
commandline: function () {
|
commandline: function () {
|
||||||
const self = this;
|
|
||||||
// Event handlers for search - closure is needed
|
// Event handlers for search - closure is needed
|
||||||
commandline.registerCallback("change", modes.SEARCH_FORWARD, function (str) { self.onKeyPress(str); });
|
commandline.registerCallback("change", modes.SEARCH_FORWARD, this.closure.onKeyPress);
|
||||||
commandline.registerCallback("submit", modes.SEARCH_FORWARD, function (str) { self.onSubmit(str); });
|
commandline.registerCallback("submit", modes.SEARCH_FORWARD, this.closure.onSubmit);
|
||||||
commandline.registerCallback("cancel", modes.SEARCH_FORWARD, function () { self.onCancel(); });
|
commandline.registerCallback("cancel", modes.SEARCH_FORWARD, this.closure.onCancel);
|
||||||
// TODO: allow advanced myModes in register/triggerCallback
|
// TODO: allow advanced myModes in register/triggerCallback
|
||||||
commandline.registerCallback("change", modes.SEARCH_BACKWARD, function (str) { self.onKeyPress(str); });
|
commandline.registerCallback("change", modes.SEARCH_BACKWARD, this.closure.onKeyPress);
|
||||||
commandline.registerCallback("submit", modes.SEARCH_BACKWARD, function (str) { self.onSubmit(str); });
|
commandline.registerCallback("submit", modes.SEARCH_BACKWARD, this.closure.onSubmit);
|
||||||
commandline.registerCallback("cancel", modes.SEARCH_BACKWARD, function () { self.onCancel(); });
|
commandline.registerCallback("cancel", modes.SEARCH_BACKWARD, this.closure.onCancel);
|
||||||
|
|
||||||
},
|
},
|
||||||
commands: function () {
|
commands: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user