File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/vs/workbench/contrib/interactive/browser Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -570,7 +570,6 @@ export class InteractiveEditor extends EditorPane {
570
570
}
571
571
}
572
572
573
-
574
573
#syncWithKernel( ) {
575
574
const notebook = this . #notebookWidget. value ?. textModel ;
576
575
const textModel = this . #codeEditorWidget. getModel ( ) ;
@@ -583,8 +582,11 @@ export class InteractiveEditor extends EditorPane {
583
582
584
583
if ( selectedOrSuggested ) {
585
584
const language = selectedOrSuggested . supportedLanguages [ 0 ] ;
586
- const newMode = language ? this . #languageService. createById ( language ) . languageId : PLAINTEXT_LANGUAGE_ID ;
587
- textModel . setLanguage ( newMode ) ;
585
+ // All kernels will initially list plaintext as the supported language before they properly initialized.
586
+ if ( language && language !== 'plaintext' ) {
587
+ const newMode = this . #languageService. createById ( language ) . languageId ;
588
+ textModel . setLanguage ( newMode ) ;
589
+ }
588
590
589
591
NOTEBOOK_KERNEL . bindTo ( this . #contextKeyService) . set ( selectedOrSuggested . id ) ;
590
592
}
You can’t perform that action at this time.
0 commit comments