diff --git a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp index 614ad2a55b26..083feffc2ff0 100644 --- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp +++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp @@ -423,7 +423,7 @@ nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell, bool aIsLinksOnly, while (true) { // === Inner while loop: go through a single doc === mFind->Find(mTypeAheadBuffer.get(), mSearchRange, mStartPointRange, mEndPointRange, getter_AddRefs(returnRange)); - + if (!returnRange) break; // Nothing found in this doc, go to outer loop (try next doc) @@ -1009,18 +1009,18 @@ nsTypeAheadFind::Find(const nsAString& aSearchString, bool aLinksOnly, return NS_OK; } - bool atEnd = false; + bool atEnd = false; if (mTypeAheadBuffer.Length()) { const nsAString& oldStr = Substring(mTypeAheadBuffer, 0, mTypeAheadBuffer.Length()); const nsAString& newStr = Substring(aSearchString, 0, mTypeAheadBuffer.Length()); if (oldStr.Equals(newStr)) atEnd = true; - + const nsAString& newStr2 = Substring(aSearchString, 0, aSearchString.Length()); const nsAString& oldStr2 = Substring(mTypeAheadBuffer, 0, aSearchString.Length()); if (oldStr2.Equals(newStr2)) atEnd = true; - + if (!atEnd) mStartFindRange = nullptr; } diff --git a/toolkit/components/typeaheadfind/nsTypeAheadFind.h b/toolkit/components/typeaheadfind/nsTypeAheadFind.h index 8ff5ad1bfe1e..2caf0b69cc72 100644 --- a/toolkit/components/typeaheadfind/nsTypeAheadFind.h +++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.h @@ -95,7 +95,7 @@ protected: // If we destroy mSoundInterface before sound has played, it won't play nsCOMPtr mSoundInterface; bool mIsSoundInitialized; - + // where selection was when user started the find nsCOMPtr mStartFindRange; nsCOMPtr mSearchRange;