codetools: fixed FindDeclaration if cursor beyond scanned code, bug #17639

git-svn-id: trunk@28325 -
This commit is contained in:
mattias 2010-11-18 18:49:20 +00:00
parent 3f5a6e0ed2
commit 503cc8dcad

View File

@ -1489,7 +1489,10 @@ begin
GetIdentStartEndAtPosition(Src,CleanCursorPos, GetIdentStartEndAtPosition(Src,CleanCursorPos,
CurPos.StartPos,CurPos.EndPos); CurPos.StartPos,CurPos.EndPos);
CursorAtIdentifier:=CurPos.StartPos<CurPos.EndPos; CursorAtIdentifier:=CurPos.StartPos<CurPos.EndPos;
IdentifierStart:=@Src[CurPos.StartPos]; if CursorAtIdentifier then
IdentifierStart:=@Src[CurPos.StartPos]
else
IdentifierStart:=PChar(Src);
end; end;
if CursorAtIdentifier then begin if CursorAtIdentifier then begin
// find declaration of identifier // find declaration of identifier