-// Copyright (c) 2008-2013 Kris Maglione <maglione.k@gmail.com>
+// Copyright (c) 2008-2014 Kris Maglione <maglione.k@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
get prompt() this.mode === modules.modes.FIND_BACKWARD ? "?" : "/",
- get onCancel() modules.rangefinder.closure.onCancel,
- get onChange() modules.rangefinder.closure.onChange,
- get onHistory() modules.rangefinder.closure.onHistory,
- get onSubmit() modules.rangefinder.closure.onSubmit
+ get onCancel() modules.rangefinder.bound.onCancel,
+ get onChange() modules.rangefinder.bound.onChange,
+ get onHistory() modules.rangefinder.bound.onHistory,
+ get onSubmit() modules.rangefinder.bound.onSubmit
});
},
mappings: function initMappings(dactyl, modules, window) {
if (!this.matchCase)
pattern = pattern.toLowerCase();
- if (!again && (pattern === "" || pattern.indexOf(this.lastString) !== 0 || this.backward)) {
+ if (!again && (pattern === "" || !pattern.startsWith(this.lastString) || this.backward)) {
if (!private_)
this.range.deselect();
if (pattern === "")
addListeners: function addListeners() {
for (let range in array.iterValues(this.ranges))
- range.window.addEventListener("unload", this.closure.onUnload, true);
+ range.window.addEventListener("unload", this.bound.onUnload, true);
},
purgeListeners: function purgeListeners() {
for (let range in array.iterValues(this.ranges))
try {
- range.window.removeEventListener("unload", this.closure.onUnload, true);
+ range.window.removeEventListener("unload", this.bound.onUnload, true);
}
catch (e if e.result === Cr.NS_ERROR_FAILURE) {}
},