mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 22:19:18 +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;
|
c2: Char;
|
||||||
begin
|
begin
|
||||||
Result:=Position;
|
Result:=Position;
|
||||||
if (Result<1) then exit;
|
if (Result<1) then exit;
|
||||||
if Result>length(Source) then begin
|
if Result>length(Source) then begin
|
||||||
Result:=length(Source);
|
Result:=length(Source);
|
||||||
exit;
|
exit;
|
||||||
|
@ -5924,7 +5924,7 @@ function TFindDeclarationTool.FindStartOfTerm(EndPos: integer; InType: boolean
|
|||||||
var CurAtom, NextAtom: TAtomPosition;
|
var CurAtom, NextAtom: TAtomPosition;
|
||||||
NextAtomType, CurAtomType: TVariableAtomType;
|
NextAtomType, CurAtomType: TVariableAtomType;
|
||||||
begin
|
begin
|
||||||
MoveCursorToCleanPos(EndPos);
|
MoveCursorToCleanPos(FindStartOfAtom(Src,EndPos));
|
||||||
NextAtom:=CurPos;
|
NextAtom:=CurPos;
|
||||||
NextAtomType:=vatSpace;
|
NextAtomType:=vatSpace;
|
||||||
repeat
|
repeat
|
||||||
|
@ -3569,7 +3569,7 @@ begin
|
|||||||
EndPos:=CurPos.EndPos;
|
EndPos:=CurPos.EndPos;
|
||||||
end;
|
end;
|
||||||
if EndPos<1 then exit;
|
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]);
|
Operand:=ExtractCode(StartPos,EndPos,[phpCommentsToSpace]);
|
||||||
if WithoutTrailingPoints then begin
|
if WithoutTrailingPoints then begin
|
||||||
while (Operand<>'') and (Operand[length(Operand)]='.') do
|
while (Operand<>'') and (Operand[length(Operand)]='.') do
|
||||||
|
Loading…
Reference in New Issue
Block a user