diff --git a/src/ce_editor.pas b/src/ce_editor.pas index 8bf927ca..7e8c20e2 100644 --- a/src/ce_editor.pas +++ b/src/ce_editor.pas @@ -249,8 +249,8 @@ var doc: TCESynMemo; begin doc := getDocument(index); - if doc.modified and (dlgFileChangeClose(fDoc.fileName) = mrCancel) then - exit(false); + if (doc.modified or (doc.fileName = doc.tempFilename)) and + (dlgFileChangeClose(fDoc.fileName) = mrCancel) then exit(false); doc.Free; result := true; end;