Skip to content

Commit

Permalink
fix #98102
Browse files Browse the repository at this point in the history
When VSCode selects preselected completion items, the index shouldn't start from 1. If there are multiple completion items with preselect=true, the first item will never be chosen.
  • Loading branch information
HaoboGu authored May 19, 2020
1 parent a7fb3ef commit 51fe691
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/suggest/suggestMemory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export abstract class Memory {
return 0;
}
let topScore = items[0].score[0];
for (let i = 1; i < items.length; i++) {
for (let i = 0; i < items.length; i++) {
const { score, completion: suggestion } = items[i];
if (score[0] !== topScore) {
// stop when leaving the group of top matches
Expand Down

0 comments on commit 51fe691

Please # to comment.