Skip to content

Commit 6d4e2a0

Browse files
committed
Revert change in navigateTo
1 parent 27d0b9f commit 6d4e2a0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/services/navigateTo.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,11 @@ namespace ts.NavigateTo {
176176
function compareNavigateToItems(i1: RawNavigateToItem, i2: RawNavigateToItem): number {
177177
// TODO(cyrusn): get the gamut of comparisons that VS already uses here.
178178
// Right now we just sort by kind first, and then by name of the item.
179+
// We first sort case insensitively. So "Aaa" will come before "bar".
180+
// Then we sort case sensitively, so "aaa" will come before "Aaa".
179181
return i1.matchKind - i2.matchKind ||
180-
ts.compareStringsCaseSensitive(i1.name, i2.name);
182+
compareStringsCaseInsensitive(i1.name, i2.name) ||
183+
compareStringsCaseSensitive(i1.name, i2.name);
181184
}
182185

183186
function createNavigateToItem(rawItem: RawNavigateToItem): NavigateToItem {

0 commit comments

Comments
 (0)