-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change hot exit to create new files for each backup #12377
Conversation
const id = this.storage.getBackupId(model); | ||
this.storage.backup(model, cancellation).ignoreErrors(); | ||
const id = this.storage.generateBackupId(model); | ||
await this.storage.backup(model, cancellation, id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to wait here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think awaiting here screwed up the custom editor. Can you try it an make sure it still works?
return { | ||
id, | ||
delete: () => this.storage.deleteBackup(model).ignoreErrors() // This cleans up after save has happened. | ||
delete: () => this.storage.deleteBackup(model, id).ignoreErrors() // This cleans up after save has happened. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete the back associated with this id, hence passing the id.
@@ -175,12 +175,16 @@ export class NativeEditorProvider implements INotebookEditorProvider, CustomEdit | |||
return this.open(uri); | |||
} | |||
|
|||
public async loadModel(file: Uri, contents?: string, skipDirtyContents?: boolean) { | |||
public async loadModel(file: Uri, contents?: string, skipDirtyContents?: boolean): Promise<INotebookModel>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backwards compatibility with old code, hopefully when custom editor is used we can blow away skipDirtyContents
completely..
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
For #12376
For #10496
Changes due to the way VSC works.
Fix for VSC Notebooks and Custom Editor (