codetools: FindDeclarationAndOverload: fixed starting search on proc name

git-svn-id: trunk@13932 -
This commit is contained in:
mattias 2008-01-31 10:30:23 +00:00
parent 7456a7ccc2
commit cd21cbb318
3 changed files with 1899 additions and 1970 deletions

View File

@ -3364,7 +3364,7 @@ var
if (NewNode.Desc in AllIdentifierDefinitions)
and (PositionInDefinitionName(NewNode,CleanPos)) then
Result:=true
else if (NewNode.Desc=ctnProcedure)
else if (NewNode.Desc in [ctnProcedure,ctnProcedureHead])
and (PositionInProcName(NewNode,false,CleanPos)) then
Result:=true
else if (NewNode.Desc=ctnProperty)

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@ unit CodeHelp;
{$mode objfpc}{$H+}
{off $IFDEF VerboseLazDoc}
{off $DEFINE VerboseLazDoc}
interface
@ -1327,7 +1327,12 @@ begin
//DebugLn(['TCodeHelpManager.GetElementChain GetDeclarationChain...']);
// get the declaration chain
Result:=GetDeclarationChain(Code,X,Y,ListOfPCodeXYPosition,CacheWasUsed);
if Result<>chprSuccess then exit;
if Result<>chprSuccess then begin
{$IFDEF VerboseLazDoc}
DebugLn(['TCodeHelpManager.GetElementChain GetDeclarationChain failed ',Code.Filename,' x=',x,' y=',y]);
{$ENDIF}
exit;
end;
if (not CacheWasUsed) and (not Complete) then exit(chprParsing);
{$IFDEF VerboseLazDoc}