mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 20:10:20 +02:00
codetools: fixed range of FindCommentInFront
git-svn-id: trunk@26546 -
This commit is contained in:
parent
241b11f6b3
commit
54ce6e667b
@ -4215,6 +4215,7 @@ var
|
||||
end;
|
||||
|
||||
// search comment in front of declaration
|
||||
//debugln(['FindDeclarationNode search comment in front: ',DeclarationTool=Self,' SkipComments=',SkipComments,' Identifier=',Identifier]);
|
||||
if (DeclarationTool=Self)
|
||||
and (not SkipComments)
|
||||
and FindCommentInFront(DeclarationNode.StartPos,Identifier,
|
||||
|
@ -2381,7 +2381,6 @@ var
|
||||
end;
|
||||
|
||||
var
|
||||
CleanCursorPos: integer;
|
||||
ANode: TCodeTreeNode;
|
||||
p: LongInt;
|
||||
CommentLvl: Integer;
|
||||
@ -2431,7 +2430,7 @@ begin
|
||||
MoveCursorToCleanPos(ANode.StartPos);
|
||||
end;
|
||||
|
||||
//debugln('TPascalReaderTool.FindCommentInFront B Area="',copy(Src,CurPos.StartPos,CleanCursorPos-CurPos.StartPos),'"');
|
||||
//debugln('TPascalReaderTool.FindCommentInFront B Area="',copy(Src,CurPos.StartPos,StartPos-CurPos.StartPos),'"');
|
||||
|
||||
FoundStartPos:=-1;
|
||||
repeat
|
||||
@ -2501,7 +2500,7 @@ begin
|
||||
end;
|
||||
ReadNextAtom;
|
||||
//DebugLn('TPascalReaderTool.FindCommentInFront NextAtom=',GetAtom);
|
||||
until (CurPos.EndPos>=CleanCursorPos) or (CurPos.EndPos>=SrcLen);
|
||||
until (CurPos.StartPos>=StartPos) or (CurPos.EndPos>=SrcLen);
|
||||
|
||||
Result:=(FoundStartPos>=1);
|
||||
CommentStart:=FoundStartPos;
|
||||
|
Loading…
Reference in New Issue
Block a user