This commit is contained in:
parent
7b0cfdd04a
commit
c246b5704f
1 changed files with 4 additions and 6 deletions
|
@ -139,12 +139,6 @@ export class NotebookEditor extends EditorPane {
|
|||
const group = this.group!;
|
||||
|
||||
this._saveEditorViewState(this.input);
|
||||
await super.setInput(input, options, context, token);
|
||||
|
||||
// Check for cancellation
|
||||
if (token.isCancellationRequested) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
this._widgetDisposableStore.clear();
|
||||
|
||||
|
@ -161,6 +155,10 @@ export class NotebookEditor extends EditorPane {
|
|||
this._widget.value!.layout(this._dimension, this._rootElement);
|
||||
}
|
||||
|
||||
// only now `setInput` and yield/await. this is AFTER the actual widget is ready. This is very important
|
||||
// so that others synchronously receive a notebook editor with the correct widget being set
|
||||
await super.setInput(input, options, context, token);
|
||||
|
||||
const model = await input.resolve();
|
||||
// Check for cancellation
|
||||
if (token.isCancellationRequested) {
|
||||
|
|
Loading…
Reference in a new issue