File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/notebook/browser Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments