提交 5222c24d 编写于 作者: R rebornix

Fix #100455. eary return if setInput is cancelled

上级 c17ed9ff
......@@ -123,6 +123,11 @@ export class NotebookEditor extends BaseEditor {
this._saveEditorViewState(this.input);
await super.setInput(input, options, token);
// Check for cancellation
if (token.isCancellationRequested) {
return undefined;
}
this._widgetDisposableStore.clear();
// there currently is a widget which we still own so
......@@ -138,6 +143,10 @@ export class NotebookEditor extends BaseEditor {
}
const model = await input.resolve(this._widget.value!.getId());
// Check for cancellation
if (token.isCancellationRequested) {
return undefined;
}
if (model === null) {
this._notificationService.prompt(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册