Skip to content

Commit 061122b

Browse files
committed
1 parent cec2927 commit 061122b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/vs/workbench/contrib/notebook/browser/contrib/coreActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ export class ChangeCellLanguageAction extends NotebookCellAction {
13081308
const providerLanguages = [...context.notebookEditor.viewModel!.notebookDocument.languages, 'markdown'];
13091309
providerLanguages.forEach(languageId => {
13101310
let description: string;
1311-
if (languageId === context.cell.language) {
1311+
if (context.cell.cellKind === CellKind.Markdown ? (languageId === 'markdown') : (languageId === context.cell.language)) {
13121312
description = localize('languageDescription', "({0}) - Current Language", languageId);
13131313
} else {
13141314
description = localize('languageDescriptionConfigured', "({0})", languageId);

src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ export class CellLanguageStatusBarItem extends Disposable {
813813
}
814814

815815
private render(): void {
816-
const modeId = this.modeService.getModeIdForLanguageName(this.cell!.language) || this.cell!.language;
816+
const modeId = this.cell?.cellKind === CellKind.Markdown ? 'markdown' : this.modeService.getModeIdForLanguageName(this.cell!.language) || this.cell!.language;
817817
this.labelElement.textContent = this.modeService.getLanguageName(modeId) || this.modeService.getLanguageName('plaintext');
818818
}
819819
}

0 commit comments

Comments
 (0)