IDE: find start of code block: add jump point

git-svn-id: trunk@34904 -
This commit is contained in:
mattias 2012-01-24 18:27:20 +00:00
parent 7ecfbd3e9e
commit 3c697b0983

View File

@ -15685,6 +15685,7 @@ var ActiveSrcEdit: TSourceEditor;
ActiveUnitInfo: TUnitInfo;
NewSource: TCodeBuffer;
NewX, NewY, NewTopLine: integer;
Flags: TJumpToCodePosFlags;
begin
if not BeginCodeTool(ActiveSrcEdit,ActiveUnitInfo,[]) then exit;
{$IFDEF IDE_DEBUG}
@ -15696,8 +15697,13 @@ begin
ActiveSrcEdit.EditorComponent.CaretY,
NewSource,NewX,NewY,NewTopLine) then
begin
Flags:=[jfFocusEditor];
if (ActiveSrcEdit.EditorComponent.CaretY<>NewY)
or (Abs(ActiveSrcEdit.EditorComponent.CaretX-NewX)>10)
then
Include(Flags,jfAddJumpPoint);
DoJumpToCodePosition(ActiveSrcEdit, ActiveUnitInfo,
NewSource, NewX, NewY, NewTopLine, [jfFocusEditor]);
NewSource, NewX, NewY, NewTopLine, Flags);
end else
DoJumpToCodeToolBossError;
end;