Skip to content

Commit 93cf440

Browse files
authored
Fix more ds functional tests (#10260)
* Eureka * misc
1 parent c7f6ed0 commit 93cf440

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/client/datascience/interactive-ipynb/nativeEditor.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,17 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor {
489489
// VS code is telling us to broadcast this to our UI. Tell the UI about the new change
490490
await this.postMessage(InteractiveWindowMessages.UpdateModel, change);
491491
}
492+
493+
// Use the current state of the model to indicate dirty (not the message itself)
494+
if (this._model && change.newDirty !== change.oldDirty) {
495+
this.modifiedEvent.fire();
496+
if (this._model.isDirty) {
497+
await this.postMessage(InteractiveWindowMessages.NotebookDirty);
498+
} else {
499+
// Then tell the UI
500+
await this.postMessage(InteractiveWindowMessages.NotebookClean);
501+
}
502+
}
492503
}
493504
private interruptExecution() {
494505
this.executeCancelTokens.forEach(t => t.cancel());
@@ -524,19 +535,6 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor {
524535
false,
525536
cancelToken
526537
);
527-
528-
if (!cancelToken.isCancellationRequested) {
529-
// Activate the other side, and send as if came from a file
530-
await this.editorProvider.show(this.file);
531-
this.shareMessage(InteractiveWindowMessages.RemoteReexecuteCode, {
532-
code: entry.code,
533-
file: Identifiers.EmptyFileName,
534-
line: 0,
535-
id: entry.cell.id,
536-
originator: this.id,
537-
debug: false
538-
});
539-
}
540538
}
541539
} catch (exc) {
542540
// Make this error our cell output

0 commit comments

Comments
 (0)