mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 21:06:39 +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 InvalidateGutter;
|
||||||
procedure InvalidateLine(Line: integer);
|
procedure InvalidateLine(Line: integer);
|
||||||
function IsBookmark(BookMark: integer): boolean;
|
function IsBookmark(BookMark: integer): boolean;
|
||||||
|
procedure MarkTextAsSaved;
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
// Byte to Char
|
// Byte to Char
|
||||||
function LogicalToPhysicalPos(const p: TPoint): TPoint;
|
function LogicalToPhysicalPos(const p: TPoint): TPoint;
|
||||||
@ -8126,6 +8127,13 @@ begin
|
|||||||
Result := GetBookMark(BookMark, x, y);
|
Result := GetBookMark(BookMark, x, y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomSynEdit.MarkTextAsSaved;
|
||||||
|
begin
|
||||||
|
TSynEditStringList(fLines).MarkSaved;
|
||||||
|
if fGutter.Visible and fGutter.ShowChanges then
|
||||||
|
InvalidateGutter;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomSynEdit.ClearUndo;
|
procedure TCustomSynEdit.ClearUndo;
|
||||||
begin
|
begin
|
||||||
fUndoList.Clear;
|
fUndoList.Clear;
|
||||||
@ -9434,9 +9442,6 @@ begin
|
|||||||
// the current state should be the unmodified state.
|
// the current state should be the unmodified state.
|
||||||
fUndoList.MarkTopAsUnmodified;
|
fUndoList.MarkTopAsUnmodified;
|
||||||
fRedoList.MarkTopAsUnmodified;
|
fRedoList.MarkTopAsUnmodified;
|
||||||
TSynEditStringList(fLines).MarkSaved;
|
|
||||||
if fGutter.Visible and fGutter.ShowChanges then
|
|
||||||
InvalidateGutter;
|
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
StatusChanged([scModified]);
|
StatusChanged([scModified]);
|
||||||
|
Loading…
Reference in New Issue
Block a user