This commit is contained in:
rebornix
2020-08-13 11:59:47 -07:00
parent cec2927609
commit 061122ba10
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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');
}
}