Skip to content

Commit 0758903

Browse files
committed
get contributed notebook provider with the right view type.
1 parent 68c8f83 commit 0758903

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
727727
}
728728

729729
private async _setKernels(textModel: NotebookTextModel, tokenSource: CancellationTokenSource) {
730-
const provider = this.notebookService.getContributedNotebookProviders(this.viewModel!.uri)[0];
730+
const provider = this.notebookService.getContributedNotebookProvider(textModel.viewType) || this.notebookService.getContributedNotebookProviders(this.viewModel!.uri)[0];
731731
const availableKernels2 = await this.notebookService.getContributedNotebookKernels2(textModel.viewType, textModel.uri, tokenSource.token);
732732

733733
if (tokenSource.token.isCancellationRequested) {

0 commit comments

Comments
 (0)