Skip to content
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

Fix new backup creation during closing a document #1344

Merged
merged 5 commits into from
Dec 17, 2023
Merged

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Jun 27, 2023

Fixes #1343

Rather than risk altering the sequence and timing of events on closing a document this simply adds another flag to the document object to indicate that it is in the process of being closed. This flag stops a new backup being created when trailing whitespace is stripped during closing.

@jeremypw jeremypw added the Good First Issue Small, self-contained issue. Good for newcomers, and/or should be an easy fix. label Jun 27, 2023
@jeremypw jeremypw changed the title Fix extra backup Fix new backup creation during closing a document Jun 27, 2023
@jeremypw jeremypw mentioned this pull request Nov 30, 2023
5 tasks
Copy link
Sponsor Member

@colinkiama colinkiama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in the linked issue, the code works fine however, there may be an bug with stripping trailing whitespace in files with a large amount of lines to deal with in another PR.

@colinkiama colinkiama merged commit cadc14e into master Dec 17, 2023
6 checks passed
@colinkiama colinkiama deleted the fix-extra-backup branch December 17, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Small, self-contained issue. Good for newcomers, and/or should be an easy fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A backup file remains after closing a document that has trailing spaces
2 participants