Skip to content

Commit

Permalink
SaveToFile: no need Update, no need DoEventState
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Jun 19, 2020
1 parent db8451e commit 559353d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions atsynedit/atsynedit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4076,13 +4076,16 @@ procedure TATSynEdit.SaveToFile(const AFilename: string);

if FOptSavingForceFinalEol then
Change1:= Strings.ActionEnsureFinalEol;

if FOptSavingTrimSpaces then
Change2:= Strings.ActionTrimSpaces(cTrimRight);

if FOptSavingTrimFinalEmptyLines then
begin
Change3:= Strings.ActionTrimFinalEmptyLines;

if Change3 then
DoCaretsFixIncorrectPos(false);
if Change3 then
DoCaretsFixIncorrectPos(false);
end;

if Change1 or Change2 or Change3 then
begin
Expand All @@ -4092,8 +4095,6 @@ procedure TATSynEdit.SaveToFile(const AFilename: string);

Strings.SaveToFile(AFilename);
Modified:= false;
DoEventState; //modified
Update;
end;


Expand Down

0 comments on commit 559353d

Please sign in to comment.