Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preselect default formatter #73535

Merged
merged 2 commits into from May 11, 2019
Merged

Preselect default formatter #73535

merged 2 commits into from May 11, 2019

Conversation

vulpivia
Copy link
Contributor

@vulpivia vulpivia commented May 9, 2019

Fixes #71368

This keeps the order of the list and selects the current default formatter.

@@ -209,11 +209,14 @@ async function showFormatterPick(accessor: ServicesAccessor, model: ITextModel,
};
});

// auto focus the default formatter
let autoFocusItem = picks.filter((pick) => pick.description)[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not nice/proper as it builds on a side-effect of a default formatter having a description. it would be better to use the loop above and the if check on line 208

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does make sense, thanks for the feedback. I added a new commit.

@msftclas
Copy link

msftclas commented May 11, 2019

CLA assistant check
All CLA requirements met.

@jrieken
Copy link
Member

jrieken commented May 11, 2019

Thanks. LGTM

@jrieken jrieken merged commit 21d9fa7 into microsoft:master May 11, 2019
@jrieken jrieken added this to the May 2019 milestone May 11, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default formater should be preselected by quick pick
3 participants