Skip to content

Commit cce0642

Browse files
Infrobpasero
andauthored
If the users selects a language, let's have it actually choose the language they selected. (Yaml vs yaml) (#288153)
* If the users selects a language, let's have it actually choose the language they selected. (Yaml vs yaml) * polish --------- Co-authored-by: Benjamin Pasero <[email protected]>
1 parent 26b2a48 commit cce0642

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/browser/parts/editor/editorStatus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,7 @@ export class ChangeLanguageAction extends Action2 {
11981198
}
11991199

12001200
return {
1201+
id: languageId,
12011202
label: languageName,
12021203
meta: extensions,
12031204
iconClasses: getIconClassesForLanguageId(languageId),
@@ -1280,8 +1281,7 @@ export class ChangeLanguageAction extends Action2 {
12801281
}
12811282
}
12821283
} else {
1283-
const languageId = languageService.getLanguageIdByLanguageName(pick.label);
1284-
languageSelection = languageService.createById(languageId);
1284+
languageSelection = languageService.createById(pick.id);
12851285

12861286
if (resource) {
12871287
// fire and forget to not slow things down

0 commit comments

Comments
 (0)