Skip to content

Commit

Permalink
Prevent file save without changes (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong committed Oct 29, 2024
1 parent 57fe28a commit d8ffc1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MarkEditMac/Sources/Editor/Models/EditorDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ private extension EditorDocument {
return // Cancelled
}

if document.hasBeenReverted {
// Reverted
if document.hasBeenReverted || !document.isDocumentEdited {
// Reverted or no unsaved changes
document.close()
} else {
// Saved
Expand Down

0 comments on commit d8ffc1b

Please sign in to comment.