1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-30 21:22:28 +01:00

Fix issue with ?.

This commit is contained in:
Kris Maglione
2011-04-28 22:27:34 -04:00
parent c4d69376d9
commit c2acfadc85
2 changed files with 13 additions and 6 deletions

View File

@@ -41,10 +41,13 @@ var RangeFinder = Module("rangefinder", {
if (this.rangeFind && equals(this.rangeFind.window.get(), this.window))
this.rangeFind.reset();
this.find("", mode === this.modes.FIND_BACKWARD);
this.find("", mode == this.modes.FIND_BACKWARD);
},
bootstrap: function (str, backward) {
if (arguments.length < 2 && this.rangeFind)
backward = this.rangeFind.reverse;
let highlighted = this.rangeFind && this.rangeFind.highlighted;
let selections = this.rangeFind && this.rangeFind.selections;
let linksOnly = false;
@@ -209,7 +212,7 @@ var RangeFinder = Module("rangefinder", {
});
},
mappings: function (dactyl, modules, window) {
const { buffer, config, mappings, modes, rangefinder } = modules;
const { Buffer, buffer, config, mappings, modes, rangefinder } = modules;
var myModes = config.browserModes.concat([modes.CARET]);
mappings.add(myModes,
@@ -231,14 +234,14 @@ var RangeFinder = Module("rangefinder", {
mappings.add(myModes.concat([modes.CARET, modes.TEXT_EDIT]), ["*"],
"Find word under cursor",
function () {
rangefinder.find(buffer.getCurrentWord(), false);
rangefinder.find(Buffer.currentWord(buffer.focusedFrame, true), false);
rangefinder.findAgain();
});
mappings.add(myModes.concat([modes.CARET, modes.TEXT_EDIT]), ["#"],
"Find word under cursor backwards",
function () {
rangefinder.find(buffer.getCurrentWord(), true);
rangefinder.find(Buffer.currentWord(buffer.focusedFrame, true), true);
rangefinder.findAgain();
});