mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 15:21:48 +02:00
SourceEditor: Fixed ExecutionLine for DualView
git-svn-id: trunk@24470 -
This commit is contained in:
parent
f2ec37b6f5
commit
c08a43fead
@ -149,8 +149,9 @@ type
|
|||||||
|
|
||||||
TSourceEditorSharedValues = class
|
TSourceEditorSharedValues = class
|
||||||
private
|
private
|
||||||
FModified: boolean;
|
|
||||||
FSharedEditorList: TFPList; // list of TSourceEditor sharing one TSynEdit
|
FSharedEditorList: TFPList; // list of TSourceEditor sharing one TSynEdit
|
||||||
|
FExecutionLine: integer;
|
||||||
|
FModified: boolean;
|
||||||
function GetOtherSharedEditors(Caller: TSourceEditor; Index: Integer
|
function GetOtherSharedEditors(Caller: TSourceEditor; Index: Integer
|
||||||
): TSourceEditor;
|
): TSourceEditor;
|
||||||
function GetSharedEditors(Index: Integer): TSourceEditor;
|
function GetSharedEditors(Index: Integer): TSourceEditor;
|
||||||
@ -165,6 +166,7 @@ type
|
|||||||
property OtherSharedEditors[Caller: TSourceEditor; Index: Integer]: TSourceEditor
|
property OtherSharedEditors[Caller: TSourceEditor; Index: Integer]: TSourceEditor
|
||||||
read GetOtherSharedEditors;
|
read GetOtherSharedEditors;
|
||||||
property Modified: Boolean read FModified write SetModified;
|
property Modified: Boolean read FModified write SetModified;
|
||||||
|
property ExecutionLine: Integer read FExecutionLine write FExecutionLine;
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -195,7 +197,6 @@ type
|
|||||||
FSyntaxHighlighterType: TLazSyntaxHighlighter;
|
FSyntaxHighlighterType: TLazSyntaxHighlighter;
|
||||||
FErrorLine: integer;
|
FErrorLine: integer;
|
||||||
FErrorColumn: integer;
|
FErrorColumn: integer;
|
||||||
FExecutionLine: integer;
|
|
||||||
FExecutionMark: TSourceMark;
|
FExecutionMark: TSourceMark;
|
||||||
FLineInfoNotification: TIDELineInfoNotification;
|
FLineInfoNotification: TIDELineInfoNotification;
|
||||||
|
|
||||||
@ -227,6 +228,7 @@ type
|
|||||||
procedure EditorEnter(Sender: TObject);
|
procedure EditorEnter(Sender: TObject);
|
||||||
procedure EditorActivateSyncro(Sender: TObject);
|
procedure EditorActivateSyncro(Sender: TObject);
|
||||||
procedure EditorDeactivateSyncro(Sender: TObject);
|
procedure EditorDeactivateSyncro(Sender: TObject);
|
||||||
|
function GetExecutionLine: integer;
|
||||||
function GetSharedEditors(Index: Integer): TSourceEditor;
|
function GetSharedEditors(Index: Integer): TSourceEditor;
|
||||||
procedure SetCodeBuffer(NewCodeBuffer: TCodeBuffer);
|
procedure SetCodeBuffer(NewCodeBuffer: TCodeBuffer);
|
||||||
function GetSource: TStrings;
|
function GetSource: TStrings;
|
||||||
@ -432,7 +434,7 @@ type
|
|||||||
read GetCurrentCursorYLine write SetCurrentCursorYLine;
|
read GetCurrentCursorYLine write SetCurrentCursorYLine;
|
||||||
property EditorComponent: TSynEdit read FEditor;
|
property EditorComponent: TSynEdit read FEditor;
|
||||||
property ErrorLine: integer read FErrorLine write SetErrorLine;
|
property ErrorLine: integer read FErrorLine write SetErrorLine;
|
||||||
property ExecutionLine: integer read FExecutionLine write SetExecutionLine;
|
property ExecutionLine: integer read GetExecutionLine write SetExecutionLine;
|
||||||
property HasExecutionMarks: Boolean read FHasExecutionMarks;
|
property HasExecutionMarks: Boolean read FHasExecutionMarks;
|
||||||
property InsertMode: Boolean read GetInsertmode;
|
property InsertMode: Boolean read GetInsertmode;
|
||||||
property OnAfterOpen: TNotifyEvent read FOnAfterOpen write FOnAfterOpen;
|
property OnAfterOpen: TNotifyEvent read FOnAfterOpen write FOnAfterOpen;
|
||||||
@ -1989,6 +1991,7 @@ constructor TSourceEditorSharedValues.Create;
|
|||||||
begin
|
begin
|
||||||
FSharedEditorList := TFPList.Create;
|
FSharedEditorList := TFPList.Create;
|
||||||
BookmarkEventLock := 0;
|
BookmarkEventLock := 0;
|
||||||
|
FExecutionLine:=-1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TSourceEditorSharedValues.Destroy;
|
destructor TSourceEditorSharedValues.Destroy;
|
||||||
@ -2024,7 +2027,6 @@ Begin
|
|||||||
FSyntaxHighlighterType:=lshNone;
|
FSyntaxHighlighterType:=lshNone;
|
||||||
FErrorLine:=-1;
|
FErrorLine:=-1;
|
||||||
FErrorColumn:=-1;
|
FErrorColumn:=-1;
|
||||||
FExecutionLine:=-1;
|
|
||||||
FExecutionMark := nil;
|
FExecutionMark := nil;
|
||||||
FHasExecutionMarks := False;
|
FHasExecutionMarks := False;
|
||||||
FMarksRequested := False;
|
FMarksRequested := False;
|
||||||
@ -3380,8 +3382,8 @@ end;
|
|||||||
|
|
||||||
procedure TSourceEditor.SetExecutionLine(NewLine: integer);
|
procedure TSourceEditor.SetExecutionLine(NewLine: integer);
|
||||||
begin
|
begin
|
||||||
if fExecutionLine=NewLine then exit;
|
if ExecutionLine=NewLine then exit;
|
||||||
fExecutionLine:=NewLine;
|
FSharedValues.ExecutionLine:=NewLine;
|
||||||
UpdateExecutionSourceMark;
|
UpdateExecutionSourceMark;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -4054,6 +4056,11 @@ begin
|
|||||||
dec(FSyncroLockCount);
|
dec(FSyncroLockCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TSourceEditor.GetExecutionLine: integer;
|
||||||
|
begin
|
||||||
|
Result := FSharedValues.ExecutionLine;
|
||||||
|
end;
|
||||||
|
|
||||||
function TSourceEditor.GetSharedEditors(Index: Integer): TSourceEditor;
|
function TSourceEditor.GetSharedEditors(Index: Integer): TSourceEditor;
|
||||||
begin
|
begin
|
||||||
Result := FSharedValues.SharedEditors[Index];
|
Result := FSharedValues.SharedEditors[Index];
|
||||||
@ -8351,7 +8358,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if AMark.IsBreakPoint and (Editor.FExecutionMark <> nil) and
|
if AMark.IsBreakPoint and (Editor.FExecutionMark <> nil) and
|
||||||
(AMark.Line = Editor.FExecutionLine)
|
(AMark.Line = Editor.ExecutionLine)
|
||||||
then
|
then
|
||||||
Editor.UpdateExecutionSourceMark;
|
Editor.UpdateExecutionSourceMark;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user