Skip to content

Commit

Permalink
fix #104581
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Aug 13, 2020
1 parent cec2927 commit 061122b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ export class ChangeCellLanguageAction extends NotebookCellAction {
const providerLanguages = [...context.notebookEditor.viewModel!.notebookDocument.languages, 'markdown'];
providerLanguages.forEach(languageId => {
let description: string;
if (languageId === context.cell.language) {
if (context.cell.cellKind === CellKind.Markdown ? (languageId === 'markdown') : (languageId === context.cell.language)) {
description = localize('languageDescription', "({0}) - Current Language", languageId);
} else {
description = localize('languageDescriptionConfigured', "({0})", languageId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ export class CellLanguageStatusBarItem extends Disposable {
}

private render(): void {
const modeId = this.modeService.getModeIdForLanguageName(this.cell!.language) || this.cell!.language;
const modeId = this.cell?.cellKind === CellKind.Markdown ? 'markdown' : this.modeService.getModeIdForLanguageName(this.cell!.language) || this.cell!.language;
this.labelElement.textContent = this.modeService.getLanguageName(modeId) || this.modeService.getLanguageName('plaintext');
}
}
Expand Down

0 comments on commit 061122b

Please sign in to comment.