From 14a65f65beda9bf3e318f7c19a00e043bddfcad1 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Wed, 17 Jan 2018 04:11:39 +0100 Subject: [PATCH] save after warn, dont save temp modules --- src/ce_main.pas | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ce_main.pas b/src/ce_main.pas index fc972368..c27137b3 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -1932,7 +1932,7 @@ begin begin d := fMultidoc.getDocument(i); d.disableFileDateCheck := true; - if d.modified or (d.fileName = d.tempFilename) then + if d.modified or d.isTemporary then begin f += #9 + shortenPath(d.filename) + LineEnding; c := true; @@ -1993,8 +1993,11 @@ begin else if ModalResult = mrAll then begin for i := 0 to fMultidoc.documentCount-1 do - if fMultidoc.document[i].modified then - fMultidoc.document[i].save; + begin + d := fMultidoc.document[i]; + if d.modified and not d.isTemporary then + d.save; + end; if assigned(fProject) and fProject.modified then fProject.saveToFile(fProject.filename); for i := 0 to fProjectGroup.projectCount-1 do