Autocomplete fails if there's only one result. sr=sfraser, b=354018

git-svn-id: svn://10.0.0.236/trunk@212858 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hwaara%gmail.com
2006-09-29 07:04:05 +00:00
parent 2b1a796ba1
commit f1d35c76d7

View File

@@ -2697,12 +2697,12 @@ nsSimpleGlobalHistory::AutoCompleteSearch(const nsACString& aSearchString,
if (itemArray.Count() > 1) {
// sort it
itemArray.Sort(AutoCompleteSortComparison, nsnull);
}
// place the sorted array into the autocomplete results
for (PRInt32 i = 0; i < itemArray.Count(); ++i) {
nsIHistoryItem* item = itemArray[i];
resultItems->AppendElement(NS_STATIC_CAST(nsISupports*, item));
}
// place the sorted array into the autocomplete results
for (PRInt32 i = 0; i < itemArray.Count(); ++i) {
nsIHistoryItem* item = itemArray[i];
resultItems->AppendElement(NS_STATIC_CAST(nsISupports*, item));
}
}