mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 11:10:31 +02:00
IDE: find start of code block: add jump point
git-svn-id: trunk@34904 -
This commit is contained in:
parent
7ecfbd3e9e
commit
3c697b0983
@ -15685,6 +15685,7 @@ var ActiveSrcEdit: TSourceEditor;
|
|||||||
ActiveUnitInfo: TUnitInfo;
|
ActiveUnitInfo: TUnitInfo;
|
||||||
NewSource: TCodeBuffer;
|
NewSource: TCodeBuffer;
|
||||||
NewX, NewY, NewTopLine: integer;
|
NewX, NewY, NewTopLine: integer;
|
||||||
|
Flags: TJumpToCodePosFlags;
|
||||||
begin
|
begin
|
||||||
if not BeginCodeTool(ActiveSrcEdit,ActiveUnitInfo,[]) then exit;
|
if not BeginCodeTool(ActiveSrcEdit,ActiveUnitInfo,[]) then exit;
|
||||||
{$IFDEF IDE_DEBUG}
|
{$IFDEF IDE_DEBUG}
|
||||||
@ -15696,8 +15697,13 @@ begin
|
|||||||
ActiveSrcEdit.EditorComponent.CaretY,
|
ActiveSrcEdit.EditorComponent.CaretY,
|
||||||
NewSource,NewX,NewY,NewTopLine) then
|
NewSource,NewX,NewY,NewTopLine) then
|
||||||
begin
|
begin
|
||||||
|
Flags:=[jfFocusEditor];
|
||||||
|
if (ActiveSrcEdit.EditorComponent.CaretY<>NewY)
|
||||||
|
or (Abs(ActiveSrcEdit.EditorComponent.CaretX-NewX)>10)
|
||||||
|
then
|
||||||
|
Include(Flags,jfAddJumpPoint);
|
||||||
DoJumpToCodePosition(ActiveSrcEdit, ActiveUnitInfo,
|
DoJumpToCodePosition(ActiveSrcEdit, ActiveUnitInfo,
|
||||||
NewSource, NewX, NewY, NewTopLine, [jfFocusEditor]);
|
NewSource, NewX, NewY, NewTopLine, Flags);
|
||||||
end else
|
end else
|
||||||
DoJumpToCodeToolBossError;
|
DoJumpToCodeToolBossError;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user