Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Jun 12, 2020
1 parent bd7682a commit cd60b70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,19 @@ export class NativeEditorNotebookModel implements INotebookModel {
break;
case 'save':
this._state.saveChangeCount = this._state.changeCount;
// Trigger event.
if (this.useNativeEditorApi) {
changed = true;
}
break;
case 'saveAs':
this._state.saveChangeCount = this._state.changeCount;
this._state.changeCount = this._state.saveChangeCount = 0;
this._state.file = change.target;
// Trigger event.
if (this.useNativeEditorApi) {
changed = true;
}
break;
default:
break;
Expand Down
6 changes: 0 additions & 6 deletions src/client/datascience/notebook/contentProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ export class NotebookContentProvider implements VSCodeNotebookContentProvider {
}
if (model.isUntitled) {
await this.commandManager.executeCommand('workbench.action.files.saveAs', document.uri);
// tslint:disable-next-line: no-suspicious-comment
//TODO: VSC doesn't handle this well.
// What if user doesn't save it.
if (model.isUntitled) {
throw new Error('Not saved');
}
} else {
await this.notebookStorage.save(model, cancellation);
}
Expand Down

0 comments on commit cd60b70

Please sign in to comment.