Bug 190838. Status bar repeatedly says 'find stopped'. r=brade, sr=jst, a=asa

This commit is contained in:
aaronl%netscape.com 2003-01-29 03:31:47 +00:00
Родитель b93cd96532
Коммит 063396801a
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -636,7 +636,7 @@ nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent)
// 1. it is a way for the user to deselect with the keyboard
// 2. it is a way for the user to cancel incremental find with
// visual feedback
if (mIsTypeAheadOn) {
if (mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty()) {
// If Escape is normally used for a command, don't do it
aEvent->PreventDefault();
CancelFind();
@ -1780,7 +1780,7 @@ nsTypeAheadFind::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aC
NS_IMETHODIMP
nsTypeAheadFind::GetIsActive(PRBool *aIsActive)
{
*aIsActive = !mTypeAheadBuffer.IsEmpty();
*aIsActive = mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty();
return NS_OK;
}
@ -1974,6 +1974,11 @@ nsTypeAheadFind::CancelFind()
// 5. User tabs (this can move the selection)
// 6. Timer expires
if (mLinksOnlyManuallySet == PR_FALSE && mTypeAheadBuffer.IsEmpty()) {
// Nothing to cancel
return NS_OK;
}
if (mIsTypeAheadOn || mRepeatingMode != eRepeatingNone) {
mTypeAheadBuffer.Truncate();
DisplayStatus(PR_FALSE, nsnull, PR_TRUE); // Clear status