Skip to content

Commit 43069f0

Browse files
committed
"Pattern not found" notice should show actual input text
1 parent 5d13cd0 commit 43069f0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

common/content/finder.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,12 @@ var Finder = Module("finder", {
176176
*/
177177
onFindResult: function(aData) {
178178
if (aData.result == Ci.nsITypeAheadFind.FIND_NOTFOUND) {
179-
liberator.echoerr("Pattern not found: " + aData.searchString, commandline.FORCE_SINGLELINE);
179+
// Don't use aData.searchString, it may be a substring of the
180+
// user's actual input text and that can be confusing.
181+
// See https://github.com/vimperator/vimperator-labs/issues/401#issuecomment-180522987
182+
// for an example.
183+
let searchString = this.findbar._findField.value;
184+
liberator.echoerr("Pattern not found: " + searchString, commandline.FORCE_SINGLELINE);
180185
}
181186
else if (aData.result == Ci.nsITypeAheadFind.FIND_WRAPPED) {
182187
let msg = aData.findBackwards ? "Search hit TOP, continuing at BOTTOM" : "Search hit BOTTOM, continuing at TOP";

0 commit comments

Comments
 (0)