mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 18:24:19 +02:00
+ TCodeEditor.SetDebuggerRow
works like SetHighlightRow but is only disposed by a SetDebuggerRow(-1) so the current stop point in debugging is not lost if we move the cursor
This commit is contained in:
parent
ac173d9347
commit
0d95903c65
@ -410,7 +410,7 @@ begin
|
|||||||
MyApp.SetCmdState([cmResetDebugger],false);
|
MyApp.SetCmdState([cmResetDebugger],false);
|
||||||
W:=PSourceWindow(LastSource);
|
W:=PSourceWindow(LastSource);
|
||||||
if assigned(W) then
|
if assigned(W) then
|
||||||
W^.Editor^.SetHighlightRow(-1);
|
W^.Editor^.SetDebuggerRow(-1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDebugController.AnnotateError;
|
procedure TDebugController.AnnotateError;
|
||||||
@ -445,7 +445,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
W^.Editor^.SetCurPtr(0,Line);
|
W^.Editor^.SetCurPtr(0,Line);
|
||||||
W^.Editor^.TrackCursor(true);
|
W^.Editor^.TrackCursor(true);
|
||||||
W^.Editor^.SetHighlightRow(Line);
|
W^.Editor^.SetDebuggerRow(Line);
|
||||||
ReadWatches;
|
ReadWatches;
|
||||||
if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
|
if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
|
||||||
W^.Select;
|
W^.Select;
|
||||||
@ -459,7 +459,7 @@ begin
|
|||||||
W:=TryToOpenFile(nil,fn,0,Line,false);
|
W:=TryToOpenFile(nil,fn,0,Line,false);
|
||||||
if assigned(W) then
|
if assigned(W) then
|
||||||
begin
|
begin
|
||||||
W^.Editor^.SetHighlightRow(Line);
|
W^.Editor^.SetDebuggerRow(Line);
|
||||||
W^.Editor^.TrackCursor(true);
|
W^.Editor^.TrackCursor(true);
|
||||||
ReadWatches;
|
ReadWatches;
|
||||||
if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
|
if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
|
||||||
@ -482,7 +482,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
{ should now be open }
|
{ should now be open }
|
||||||
W:=TryToOpenFile(nil,fn,0,Line,true);
|
W:=TryToOpenFile(nil,fn,0,Line,true);
|
||||||
W^.Editor^.SetHighlightRow(Line);
|
W^.Editor^.SetDebuggerRow(Line);
|
||||||
W^.Editor^.TrackCursor(true);
|
W^.Editor^.TrackCursor(true);
|
||||||
ReadWatches;
|
ReadWatches;
|
||||||
if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
|
if Not assigned(GDBWindow) or not GDBWindow^.GetState(sfActive) then
|
||||||
@ -535,7 +535,7 @@ begin
|
|||||||
MyApp.SetCmdState([cmResetDebugger],false);
|
MyApp.SetCmdState([cmResetDebugger],false);
|
||||||
W:=PSourceWindow(LastSource);
|
W:=PSourceWindow(LastSource);
|
||||||
if assigned(W) then
|
if assigned(W) then
|
||||||
W^.Editor^.SetHighlightRow(-1);
|
W^.Editor^.SetDebuggerRow(-1);
|
||||||
If HiddenStepsCount=0 then
|
If HiddenStepsCount=0 then
|
||||||
InformationBox(#3'Program exited with '#13#3'exitcode = %d',@code)
|
InformationBox(#3'Program exited with '#13#3'exitcode = %d',@code)
|
||||||
else
|
else
|
||||||
@ -2042,7 +2042,13 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.26 1999-08-22 22:26:48 pierre
|
Revision 1.27 1999-08-24 22:04:33 pierre
|
||||||
|
+ TCodeEditor.SetDebuggerRow
|
||||||
|
works like SetHighlightRow but is only disposed by a SetDebuggerRow(-1)
|
||||||
|
so the current stop point in debugging is not lost if
|
||||||
|
we move the cursor
|
||||||
|
|
||||||
|
Revision 1.26 1999/08/22 22:26:48 pierre
|
||||||
+ Registration of Breakpoint/Watches windows
|
+ Registration of Breakpoint/Watches windows
|
||||||
|
|
||||||
Revision 1.25 1999/08/16 18:25:15 peter
|
Revision 1.25 1999/08/16 18:25:15 peter
|
||||||
|
@ -201,6 +201,7 @@ type
|
|||||||
Flags : longint;
|
Flags : longint;
|
||||||
TabSize : integer;
|
TabSize : integer;
|
||||||
HighlightRow: sw_integer;
|
HighlightRow: sw_integer;
|
||||||
|
DebuggerRow: sw_integer;
|
||||||
constructor Init(var Bounds: TRect; AHScrollBar, AVScrollBar:
|
constructor Init(var Bounds: TRect; AHScrollBar, AVScrollBar:
|
||||||
PScrollBar; AIndicator: PIndicator; AbufSize:Sw_Word);
|
PScrollBar; AIndicator: PIndicator; AbufSize:Sw_Word);
|
||||||
procedure SetFlags(AFlags: longint); virtual;
|
procedure SetFlags(AFlags: longint); virtual;
|
||||||
@ -227,6 +228,7 @@ type
|
|||||||
procedure SetSelection(A, B: TPoint); virtual;
|
procedure SetSelection(A, B: TPoint); virtual;
|
||||||
procedure SetHighlight(A, B: TPoint); virtual;
|
procedure SetHighlight(A, B: TPoint); virtual;
|
||||||
procedure SetHighlightRow(Row: sw_integer); virtual;
|
procedure SetHighlightRow(Row: sw_integer); virtual;
|
||||||
|
procedure SetDebuggerRow(Row: sw_integer); virtual;
|
||||||
procedure SelectAll(Enable: boolean); virtual;
|
procedure SelectAll(Enable: boolean); virtual;
|
||||||
function InsertFrom(Editor: PCodeEditor): Boolean; virtual;
|
function InsertFrom(Editor: PCodeEditor): Boolean; virtual;
|
||||||
function InsertText(const S: string): Boolean; virtual;
|
function InsertText(const S: string): Boolean; virtual;
|
||||||
@ -1071,6 +1073,7 @@ begin
|
|||||||
SetState(sfCursorVis,true);
|
SetState(sfCursorVis,true);
|
||||||
SetFlags(DefaultCodeEditorFlags); TabSize:=DefaultTabSize;
|
SetFlags(DefaultCodeEditorFlags); TabSize:=DefaultTabSize;
|
||||||
SetHighlightRow(-1);
|
SetHighlightRow(-1);
|
||||||
|
SetDebuggerRow(-1);
|
||||||
SetCurPtr(0,0);
|
SetCurPtr(0,0);
|
||||||
Indicator:=AIndicator;
|
Indicator:=AIndicator;
|
||||||
UpdateIndicator; LimitsChanged;
|
UpdateIndicator; LimitsChanged;
|
||||||
@ -1271,6 +1274,7 @@ var
|
|||||||
begin
|
begin
|
||||||
E:=Event;
|
E:=Event;
|
||||||
OldEvent:=CurEvent;
|
OldEvent:=CurEvent;
|
||||||
|
if (E.what and (evMouse or evKeyboard))<>0 then
|
||||||
CurEvent:=@E;
|
CurEvent:=@E;
|
||||||
if (InASCIIMode=false) or (Event.What<>evKeyDown) then
|
if (InASCIIMode=false) or (Event.What<>evKeyDown) then
|
||||||
ConvertEvent(Event);
|
ConvertEvent(Event);
|
||||||
@ -1595,6 +1599,11 @@ begin
|
|||||||
Color:=CombineColors(Color,HighlightRowColor);
|
Color:=CombineColors(Color,HighlightRowColor);
|
||||||
FreeFormat[X]:=false;
|
FreeFormat[X]:=false;
|
||||||
end;
|
end;
|
||||||
|
if DebuggerRow=AY then
|
||||||
|
begin
|
||||||
|
Color:=CombineColors(Color,HighlightRowColor);
|
||||||
|
FreeFormat[X]:=false;
|
||||||
|
end;
|
||||||
if isbreak then
|
if isbreak then
|
||||||
begin
|
begin
|
||||||
Color:=ColorTab[coBreakColor];
|
Color:=ColorTab[coBreakColor];
|
||||||
@ -3499,6 +3508,12 @@ begin
|
|||||||
DrawView;
|
DrawView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCodeEditor.SetDebuggerRow(Row: sw_integer);
|
||||||
|
begin
|
||||||
|
DebuggerRow:=Row;
|
||||||
|
DrawView;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCodeEditor.SelectAll(Enable: boolean);
|
procedure TCodeEditor.SelectAll(Enable: boolean);
|
||||||
var A,B: TPoint;
|
var A,B: TPoint;
|
||||||
begin
|
begin
|
||||||
@ -4229,7 +4244,13 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.42 1999-08-22 22:20:30 pierre
|
Revision 1.43 1999-08-24 22:04:35 pierre
|
||||||
|
+ TCodeEditor.SetDebuggerRow
|
||||||
|
works like SetHighlightRow but is only disposed by a SetDebuggerRow(-1)
|
||||||
|
so the current stop point in debugging is not lost if
|
||||||
|
we move the cursor
|
||||||
|
|
||||||
|
Revision 1.42 1999/08/22 22:20:30 pierre
|
||||||
* selection extension bug removed, via oldEvent pointer in TCodeEditor.HandleEvent
|
* selection extension bug removed, via oldEvent pointer in TCodeEditor.HandleEvent
|
||||||
|
|
||||||
Revision 1.41 1999/08/16 18:25:28 peter
|
Revision 1.41 1999/08/16 18:25:28 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user