1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-03 09:35:47 +01:00

Merge default.

--HG--
branch : mode-refactoring
This commit is contained in:
Kris Maglione
2010-10-09 16:48:11 -04:00
36 changed files with 266 additions and 157 deletions

View File

@@ -119,7 +119,6 @@ const RangeFinder = Module("rangefinder", {
// Called when the search is canceled - for example if someone presses
// escape while typing a search
onCancel: function () {
// TODO: code to reposition the document to the place before search started
if (this.rangeFind)
this.rangeFind.cancel();
},
@@ -152,11 +151,9 @@ const RangeFinder = Module("rangefinder", {
modes.addMode("FIND_BACKWARD", true);
},
commandline: function () {
// Event handlers for search - closure is needed
commandline.registerCallback("change", modes.FIND_FORWARD, this.closure.onKeyPress);
commandline.registerCallback("submit", modes.FIND_FORWARD, this.closure.onSubmit);
commandline.registerCallback("cancel", modes.FIND_FORWARD, this.closure.onCancel);
// TODO: allow advanced myModes in register/triggerCallback
commandline.registerCallback("change", modes.FIND_BACKWARD, this.closure.onKeyPress);
commandline.registerCallback("submit", modes.FIND_BACKWARD, this.closure.onSubmit);
commandline.registerCallback("cancel", modes.FIND_BACKWARD, this.closure.onCancel);