diff --git a/common/content/finder.js b/common/content/finder.js
index 243115ac..1c5f096b 100644
--- a/common/content/finder.js
+++ b/common/content/finder.js
@@ -9,7 +9,7 @@
/** @instance rangefinder */
const RangeFinder = Module("rangefinder", {
init: function () {
- this.lastSearchPattern = "";
+ this.lastFindPattern = "";
},
openPrompt: function (mode) {
@@ -29,8 +29,8 @@ const RangeFinder = Module("rangefinder", {
let selections = this.rangeFind && this.rangeFind.selections;
let linksOnly = false;
let regexp = false;
- let matchCase = options["searchcase"] === "smart" ? /[A-Z]/.test(str) :
- options["searchcase"] === "ignore" ? false : true;
+ let matchCase = options["findcase"] === "smart" ? /[A-Z]/.test(str) :
+ options["findcase"] === "ignore" ? false : true;
str = str.replace(/\\(.|$)/g, function (m, n1) {
if (n1 == "c")
@@ -65,12 +65,12 @@ const RangeFinder = Module("rangefinder", {
this.rangeFind.highlighted = highlighted;
this.rangeFind.selections = selections;
}
- return this.lastSearchPattern = str;
+ return this.lastFindPattern = str;
},
find: function (pattern, backwards) {
let str = this.bootstrap(pattern, backwards);
- if (!this.rangeFind.search(str))
+ if (!this.rangeFind.find(str))
this.timeout(function () { dactyl.echoerr("E486: Pattern not found: " + pattern); }, 0);
return this.rangeFind.found;
@@ -78,47 +78,47 @@ const RangeFinder = Module("rangefinder", {
findAgain: function (reverse) {
if (!this.rangeFind)
- this.find(this.lastSearchPattern);
- else if (!this.rangeFind.search(null, reverse))
- dactyl.echoerr("E486: Pattern not found: " + this.lastSearchPattern);
+ this.find(this.lastFindPattern);
+ else if (!this.rangeFind.find(null, reverse))
+ dactyl.echoerr("E486: Pattern not found: " + this.lastFindPattern);
else if (this.rangeFind.wrapped)
// hack needed, because wrapping causes a "scroll" event which
// clears our command line
this.timeout(function () {
- let msg = this.rangeFind.backward ? "search hit TOP, continuing at BOTTOM"
- : "search hit BOTTOM, continuing at TOP";
+ let msg = this.rangeFind.backward ? "find hit TOP, continuing at BOTTOM"
+ : "find hit BOTTOM, continuing at TOP";
commandline.echo(msg, commandline.HL_WARNINGMSG,
commandline.APPEND_TO_MESSAGES | commandline.FORCE_SINGLELINE);
}, 0);
else
- commandline.echo((this.rangeFind.backward ? "?" : "/") + this.lastSearchPattern, null, commandline.FORCE_SINGLELINE);
+ commandline.echo((this.rangeFind.backward ? "?" : "/") + this.lastFindPattern, null, commandline.FORCE_SINGLELINE);
- if (options["hlsearch"])
+ if (options["hlfind"])
this.highlight();
this.rangeFind.focus();
},
- // Called when the user types a key in the search dialog. Triggers a find attempt if 'incsearch' is set
+ // Called when the user types a key in the find dialog. Triggers a find attempt if 'incfind' is set
onKeyPress: function (command) {
- if (options["incsearch"]) {
+ if (options["incfind"]) {
command = this.bootstrap(command);
- this.rangeFind.search(command);
+ this.rangeFind.find(command);
}
},
onSubmit: function (command) {
- if (!options["incsearch"] || !this.rangeFind || !this.rangeFind.found) {
+ if (!options["incfind"] || !this.rangeFind || !this.rangeFind.found) {
this.clear();
- this.find(command || this.lastSearchPattern, modes.extended & modes.FIND_BACKWARD);
+ this.find(command || this.lastFindPattern, modes.extended & modes.FIND_BACKWARD);
}
- if (options["hlsearch"])
+ if (options["hlfind"])
this.highlight();
this.rangeFind.focus();
},
- // Called when the search is canceled - for example if someone presses
- // escape while typing a search
+ // Called when the find is canceled - for example if someone presses
+ // escape while typing a find
onCancel: function () {
if (this.rangeFind)
this.rangeFind.cancel();
@@ -128,7 +128,7 @@ const RangeFinder = Module("rangefinder", {
set rangeFind(val) buffer.localStore.rangeFind = val,
/**
- * Highlights all occurrences of the last searched for string in the
+ * Highlights all occurrences of the last finded for string in the
* current buffer.
*/
highlight: function () {
@@ -137,7 +137,7 @@ const RangeFinder = Module("rangefinder", {
},
/**
- * Clears all search highlighting.
+ * Clears all find highlighting.
*/
clear: function () {
if (this.rangeFind)
@@ -159,8 +159,8 @@ const RangeFinder = Module("rangefinder", {
commandline.registerCallback("cancel", modes.FIND_BACKWARD, this.closure.onCancel);
},
commands: function () {
- commands.add(["noh[lsearch]"],
- "Remove the search highlighting",
+ commands.add(["noh[lfind]"],
+ "Remove the find highlighting",
function () { rangefinder.clear(); },
{ argCount: "0" });
},
@@ -168,11 +168,11 @@ const RangeFinder = Module("rangefinder", {
var myModes = config.browserModes.concat([modes.CARET]);
mappings.add(myModes,
- ["/"], "Search forward for a pattern",
+ ["/"], "Find a pattern starting at the current caret position",
function () { rangefinder.openPrompt(modes.FIND_FORWARD); });
mappings.add(myModes,
- ["?"], "Search backwards for a pattern",
+ ["?"], "Find a pattern backward of the current caret position",
function () { rangefinder.openPrompt(modes.FIND_BACKWARD); });
mappings.add(myModes,
@@ -203,8 +203,8 @@ const RangeFinder = Module("rangefinder", {
// The above should be sufficient, but: https://bugzilla.mozilla.org/show_bug.cgi?id=348187
prefs.safeSet("accessibility.typeaheadfind", false);
- options.add(["hlsearch", "hls"],
- "Highlight all /search pattern matches on the current page after a search",
+ options.add(["hlfind", "hlf"],
+ "Highlight all /find pattern matches on the current page after submission",
"boolean", false, {
setter: function (value) {
try {
@@ -219,8 +219,8 @@ const RangeFinder = Module("rangefinder", {
}
});
- options.add(["searchcase", "sc"],
- "Search case matching mode",
+ options.add(["findcase", "fc"],
+ "Find case matching mode",
"string", "smart",
{
completer: function () [
@@ -230,8 +230,8 @@ const RangeFinder = Module("rangefinder", {
]
});
- options.add(["incsearch", "is"],
- "Search for a pattern incrementally as it is typed rather than awaiting
- Maximum number of Ex commands and search patterns to store in the
+ Maximum number of Ex commands and find patterns to store in the
Highlight previous search pattern matches.
+Highlight previous find pattern matches.
Show the first match for a search pattern as it is typed.
+Show the first match for a find pattern as it is typed.
- &dactyl.appName; provides a Vim-like incremental search interface to + &dactyl.appName; provides a Vim-like incremental find interface to replace &dactyl.host;'s crippled Typeahead Find. Among other improvements, - our search service: + our find service:
- Regular expression search, however, is not currently available unless the + Regular expression find, however, is not currently available unless the /Find Bar/ service is installed, in which case it may be toggled on with - a search flag. + a find flag.
Search forward for the first occurrence of pattern.
+Find pattern starting at the current caret position.
The following escape sequences can be used to modify the - behavior of the search. When flags conflict, the last to + behavior of the find. When flags conflict, the last to appear is the one that takes effect.
Search backward for pattern, in exactly the same manner as
+ Find a pattern backward of the current caret position in exactly the
+ same manner as
Find next. Repeat the last search.
+Find next. Repeat the last find.
Find previous. Repeat the last search in the opposite direction.
+Find previous. Repeat the last find in the opposite direction.
- Remove the search highlighting. The document is highlighted again
- when another search command is used or the