Skip to content

Commit

Permalink
Add previously selected kernel to MRU on switching. (#166662)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Nov 18, 2022
1 parent c1fa325 commit 1b1e2a2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,11 @@ export class KernelPickerMRUStrategy extends KernelPickerStrategyBase {
}

protected override _selecteKernel(notebook: NotebookTextModel, kernel: INotebookKernel): void {
const currentInfo = this._notebookKernelService.getMatchingKernel(notebook);
if (currentInfo.selected) {
// there is already a selected kernel
this._notebookKernelHistoryService.addMostRecentKernel(currentInfo.selected);
}
super._selecteKernel(notebook, kernel);
this._notebookKernelHistoryService.addMostRecentKernel(kernel);
}
Expand Down

0 comments on commit 1b1e2a2

Please sign in to comment.