mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 07:19:14 +02:00
* get it to compile with debug conditional
This commit is contained in:
parent
4849432ede
commit
00ec849bfb
@ -123,10 +123,15 @@ const
|
|||||||
eaDeleteLine = 4;
|
eaDeleteLine = 4;
|
||||||
eaDeleteText = 5;
|
eaDeleteText = 5;
|
||||||
eaSelectionChanged = 6;
|
eaSelectionChanged = 6;
|
||||||
LastAction = eaSelectionChanged;
|
eaCut = 7;
|
||||||
|
eaCopy = 8;
|
||||||
|
eaPaste = 9;
|
||||||
|
eaClear = 10;
|
||||||
|
LastAction = eaClear;
|
||||||
|
|
||||||
ActionString : array [0..LastAction] of string[8] =
|
ActionString : array [0..LastAction] of string[8] =
|
||||||
('','Move','InsLine','InsText','DelLine','DelText','SelCh');
|
('','Move','InsLine','InsText','DelLine','DelText',
|
||||||
|
'SelCh','Cut','Copy','Paste','Clear');
|
||||||
|
|
||||||
CIndicator = #2#3#1;
|
CIndicator = #2#3#1;
|
||||||
CEditor = #33#34#35#36#37#38#39#40#41#42#43#44#45#46#47#48#49;
|
CEditor = #33#34#35#36#37#38#39#40#41#42#43#44#45#46#47#48#49;
|
||||||
@ -198,6 +203,7 @@ type
|
|||||||
|
|
||||||
PEditorActionCollection = ^TEditorActionCollection;
|
PEditorActionCollection = ^TEditorActionCollection;
|
||||||
TEditorActionCollection = object(TCollection)
|
TEditorActionCollection = object(TCollection)
|
||||||
|
function At(Idx : sw_integer) : PEditorAction;
|
||||||
procedure FreeItem(Item: Pointer); virtual;
|
procedure FreeItem(Item: Pointer); virtual;
|
||||||
end;
|
end;
|
||||||
{$endif Undo}
|
{$endif Undo}
|
||||||
@ -4057,11 +4063,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCodeEditor.AddAction(AAction: byte; AStartPos, AEndPos: TPoint; AText: string);
|
procedure TCodeEditor.AddAction(AAction: byte; AStartPos, AEndPos: TPoint; AText: string);
|
||||||
|
{$ifdef Undo}
|
||||||
var
|
var
|
||||||
ActionIntegrated : boolean;
|
ActionIntegrated : boolean;
|
||||||
pa : PEditorAction;
|
pa : PEditorAction;
|
||||||
S : String;
|
S : String;
|
||||||
|
{$endif Undo}
|
||||||
begin
|
begin
|
||||||
|
{$ifdef Undo}
|
||||||
if (UndoList=nil) or (not StoreUndo) then Exit;
|
if (UndoList=nil) or (not StoreUndo) then Exit;
|
||||||
ActionIntegrated:=false;
|
ActionIntegrated:=false;
|
||||||
if UndoList^.count>0 then
|
if UndoList^.count>0 then
|
||||||
@ -4097,6 +4106,7 @@ begin
|
|||||||
UpdateUndoRedo(cmRedo,0);
|
UpdateUndoRedo(cmRedo,0);
|
||||||
RedoList^.FreeAll;
|
RedoList^.FreeAll;
|
||||||
end;
|
end;
|
||||||
|
{$endif Undo}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeEditor.ValidBlock: boolean;
|
function TCodeEditor.ValidBlock: boolean;
|
||||||
@ -4373,11 +4383,6 @@ begin
|
|||||||
DisposeStr(Text);
|
DisposeStr(Text);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEditorActionCollection.At(Idx : sw_integer) : PEditorAction;
|
|
||||||
begin
|
|
||||||
At:=PEditorAction(Inherited At(Idx));
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$else}
|
{$else}
|
||||||
procedure TEditorActionCollection.FreeItem(Item: Pointer);
|
procedure TEditorActionCollection.FreeItem(Item: Pointer);
|
||||||
begin
|
begin
|
||||||
@ -4386,6 +4391,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$endif Undo}
|
{$endif Undo}
|
||||||
|
|
||||||
|
function TEditorActionCollection.At(Idx : sw_integer) : PEditorAction;
|
||||||
|
begin
|
||||||
|
At:=PEditorAction(Inherited At(Idx));
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TFileEditor.Init(var Bounds: TRect; AHScrollBar, AVScrollBar:
|
constructor TFileEditor.Init(var Bounds: TRect; AHScrollBar, AVScrollBar:
|
||||||
PScrollBar; AIndicator: PIndicator;const AFileName: string);
|
PScrollBar; AIndicator: PIndicator;const AFileName: string);
|
||||||
begin
|
begin
|
||||||
@ -4918,8 +4928,8 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.57 1999-10-28 11:15:50 pierre
|
Revision 1.58 1999-10-28 15:14:22 pierre
|
||||||
* do not agregate Insert/DeleteLine Undos
|
* get it to compile with debug conditional
|
||||||
|
|
||||||
Revision 1.56 1999/10/27 13:32:58 pierre
|
Revision 1.56 1999/10/27 13:32:58 pierre
|
||||||
* some more Undo Fixes
|
* some more Undo Fixes
|
||||||
|
Loading…
Reference in New Issue
Block a user