diff --git a/src/services/navigateTo.ts b/src/services/navigateTo.ts index be2c7b61a7e..2647a87ada7 100644 --- a/src/services/navigateTo.ts +++ b/src/services/navigateTo.ts @@ -176,8 +176,11 @@ namespace ts.NavigateTo { function compareNavigateToItems(i1: RawNavigateToItem, i2: RawNavigateToItem): number { // TODO(cyrusn): get the gamut of comparisons that VS already uses here. // Right now we just sort by kind first, and then by name of the item. + // We first sort case insensitively. So "Aaa" will come before "bar". + // Then we sort case sensitively, so "aaa" will come before "Aaa". return i1.matchKind - i2.matchKind || - ts.compareStringsCaseSensitive(i1.name, i2.name); + compareStringsCaseInsensitive(i1.name, i2.name) || + compareStringsCaseSensitive(i1.name, i2.name); } function createNavigateToItem(rawItem: RawNavigateToItem): NavigateToItem {