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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user