mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +02:00
codetools: FindStartOfTerm: fixed starting in an atom
git-svn-id: trunk@22340 -
This commit is contained in:
parent
8fc4643167
commit
c12d17af61
@ -2081,7 +2081,7 @@ var
|
||||
c2: Char;
|
||||
begin
|
||||
Result:=Position;
|
||||
if (Result<1) then exit;
|
||||
if (Result<1) then exit;
|
||||
if Result>length(Source) then begin
|
||||
Result:=length(Source);
|
||||
exit;
|
||||
|
@ -5924,7 +5924,7 @@ function TFindDeclarationTool.FindStartOfTerm(EndPos: integer; InType: boolean
|
||||
var CurAtom, NextAtom: TAtomPosition;
|
||||
NextAtomType, CurAtomType: TVariableAtomType;
|
||||
begin
|
||||
MoveCursorToCleanPos(EndPos);
|
||||
MoveCursorToCleanPos(FindStartOfAtom(Src,EndPos));
|
||||
NextAtom:=CurPos;
|
||||
NextAtomType:=vatSpace;
|
||||
repeat
|
||||
|
@ -3569,7 +3569,7 @@ begin
|
||||
EndPos:=CurPos.EndPos;
|
||||
end;
|
||||
if EndPos<1 then exit;
|
||||
//DebugLn(['TStandardCodeTool.ExtractOperand "',dbgstr(copy(Src,StartPos,EndPOs-StartPos)),'"']);
|
||||
//DebugLn(['TStandardCodeTool.ExtractOperand "',dbgstr(copy(Src,StartPos,EndPos-StartPos)),'"']);
|
||||
Operand:=ExtractCode(StartPos,EndPos,[phpCommentsToSpace]);
|
||||
if WithoutTrailingPoints then begin
|
||||
while (Operand<>'') and (Operand[length(Operand)]='.') do
|
||||
|
Loading…
Reference in New Issue
Block a user