mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-30 22:45:47 +01:00
Fix */#.
--HG-- extra : rebase_source : 6add6d006c1b04e5489968461d09056b3984bb5a
This commit is contained in:
@@ -64,11 +64,11 @@ const RangeFinder = Module("rangefinder", {
|
||||
this.rangeFind.highlighted = highlighted;
|
||||
this.rangeFind.selections = selections;
|
||||
}
|
||||
return str;
|
||||
return this.lastSearchPattern = str;
|
||||
},
|
||||
|
||||
find: function (pattern, backwards) {
|
||||
let str = this.bootstrap(pattern);
|
||||
let str = this.bootstrap(pattern, backwards);
|
||||
if (!this.rangeFind.search(str))
|
||||
this.timeout(function () { dactyl.echoerr("E486: Pattern not found: " + pattern); }, 0);
|
||||
|
||||
@@ -111,8 +111,6 @@ const RangeFinder = Module("rangefinder", {
|
||||
this.find(command || this.lastSearchPattern, modes.extended & modes.FIND_BACKWARD);
|
||||
}
|
||||
|
||||
this.lastSearchPattern = command;
|
||||
|
||||
if (options["hlsearch"])
|
||||
this.highlight();
|
||||
this.rangeFind.focus();
|
||||
@@ -194,15 +192,15 @@ const RangeFinder = Module("rangefinder", {
|
||||
mappings.add(myModes.concat([modes.CARET, modes.TEXTAREA]), ["*"],
|
||||
"Find word under cursor",
|
||||
function () {
|
||||
rangefinder._found = false;
|
||||
rangefinder.onSubmit(buffer.getCurrentWord(), false);
|
||||
rangefinder.find(buffer.getCurrentWord(), false);
|
||||
rangefinder.findAgain();
|
||||
});
|
||||
|
||||
mappings.add(myModes.concat([modes.CARET, modes.TEXTAREA]), ["#"],
|
||||
"Find word under cursor backwards",
|
||||
function () {
|
||||
rangefinder._found = false;
|
||||
rangefinder.onSubmit(buffer.getCurrentWord(), true);
|
||||
rangefinder.find(buffer.getCurrentWord(), true);
|
||||
rangefinder.findAgain();
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user