File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/vs/workbench/contrib/interactiveSession/browser Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget';
24
24
import { EDITOR_FONT_DEFAULTS , IEditorOptions } from 'vs/editor/common/config/editorOptions' ;
25
25
import { Range } from 'vs/editor/common/core/range' ;
26
26
import { ILanguageService } from 'vs/editor/common/languages/language' ;
27
+ import { PLAINTEXT_LANGUAGE_ID } from 'vs/editor/common/languages/modesRegistry' ;
27
28
import { ITextModel } from 'vs/editor/common/model' ;
28
29
import { IModelService } from 'vs/editor/common/services/model' ;
29
30
import { BracketMatchingController } from 'vs/editor/contrib/bracketMatching/browser/bracketMatching' ;
@@ -667,9 +668,7 @@ class CodeBlockPart extends Disposable implements IInteractiveResultCodeBlockPar
667
668
668
669
private setLanguage ( languageId : string ) : void {
669
670
const vscodeLanguageId = this . languageService . getLanguageIdByLanguageName ( languageId ) ;
670
- if ( vscodeLanguageId ) {
671
- this . textModel . setLanguage ( vscodeLanguageId ) ;
672
- }
671
+ this . textModel . setLanguage ( vscodeLanguageId ?? PLAINTEXT_LANGUAGE_ID ) ;
673
672
}
674
673
}
675
674
You can’t perform that action at this time.
0 commit comments