synedit: mark lines as saved in a separate method outside SetModified

git-svn-id: trunk@17777 -
This commit is contained in:
paul 2008-12-10 02:05:20 +00:00
parent 3659841c55
commit bdf7bf5e00

View File

@ -763,6 +763,7 @@ type
procedure InvalidateGutter;
procedure InvalidateLine(Line: integer);
function IsBookmark(BookMark: integer): boolean;
procedure MarkTextAsSaved;
{$IFDEF SYN_LAZARUS}
// Byte to Char
function LogicalToPhysicalPos(const p: TPoint): TPoint;
@ -8126,6 +8127,13 @@ begin
Result := GetBookMark(BookMark, x, y);
end;
procedure TCustomSynEdit.MarkTextAsSaved;
begin
TSynEditStringList(fLines).MarkSaved;
if fGutter.Visible and fGutter.ShowChanges then
InvalidateGutter;
end;
procedure TCustomSynEdit.ClearUndo;
begin
fUndoList.Clear;
@ -9434,9 +9442,6 @@ begin
// the current state should be the unmodified state.
fUndoList.MarkTopAsUnmodified;
fRedoList.MarkTopAsUnmodified;
TSynEditStringList(fLines).MarkSaved;
if fGutter.Visible and fGutter.ShowChanges then
InvalidateGutter;
end;
{$ENDIF}
StatusChanged([scModified]);