mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 19:52:35 +02:00
synedit: mark lines as saved in a separate method outside SetModified
git-svn-id: trunk@17777 -
This commit is contained in:
parent
3659841c55
commit
bdf7bf5e00
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user