Bug 963925: do not store searchString upon Highlight. r=Unfocused

This commit is contained in:
Mike de Boer 2014-02-17 15:43:01 +01:00
parent 5f1820068d
commit 49959f45f6

View File

@ -36,8 +36,9 @@ Finder.prototype = {
this._listeners = this._listeners.filter(l => l != aListener);
},
_notify: function (aSearchString, aResult, aFindBackwards, aDrawOutline) {
this._searchString = aSearchString;
_notify: function (aSearchString, aResult, aFindBackwards, aDrawOutline, aStoreResult = true) {
if (aStoreResult)
this._searchString = aSearchString;
this._outlineLink(aDrawOutline);
let foundLink = this._fastFind.foundLink;
@ -62,6 +63,7 @@ Finder.prototype = {
linkURL: linkURL,
rect: this._getResultRect(),
searchString: this._searchString,
storeResult: aStoreResult
};
for (let l of this._listeners) {
@ -110,7 +112,7 @@ Finder.prototype = {
if (aHighlight) {
let result = found ? Ci.nsITypeAheadFind.FIND_FOUND
: Ci.nsITypeAheadFind.FIND_NOTFOUND;
this._notify(aWord, result, false, false);
this._notify(aWord, result, false, false, false);
}
},