MG: fixed method jumping, cursor pos after proc head

git-svn-id: trunk@642 -
This commit is contained in:
lazarus 2002-01-29 17:15:14 +00:00
parent 14447d84f0
commit dac3b9e0a0
2 changed files with 7 additions and 1 deletions

View File

@ -1342,7 +1342,7 @@ begin
if ACleanPos>=1 then begin
if ACleanPos<=SrcLen then begin
// search line start
ALineStart:=ACleanPos;
ALineStart:=ACleanPos-1;
while (ALineStart>=1) and (not (Src[ALineStart] in [#10,#13])) do
dec(ALineStart);
inc(ALineStart);

View File

@ -173,6 +173,12 @@ writeln('TMethodJumpingCodeTool.FindJumpPoint B');
GetLineInfo(CleanCursorPos,LineStart,LineEnd,FirstAtomStart,LastAtomEnd);
if CleanCursorPos<FirstAtomStart then CleanCursorPos:=FirstAtomStart;
if CleanCursorPos>=LastAtomEnd then CleanCursorPos:=LastAtomEnd-1;
if (CleanCursorPos<=SrcLen) and (Src[CleanCursorPos]=';') then begin
MoveCursorToCleanPos(CleanCursorPos);
ReadPriorAtom;
if CurPos.StartPos>=FirstAtomStart then
CleanCursorPos:=CurPos.StartPos;
end;
// find CodeTreeNode at cursor
CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
{$IFDEF CTDEBUG}