mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 23:19:29 +02:00
codetools: fixed TStandardCodeTool.ExtractOperand for endpos
git-svn-id: trunk@21982 -
This commit is contained in:
parent
90d1f4c944
commit
19a53151f7
@ -3509,12 +3509,12 @@ begin
|
||||
Node:=FindDeepestNodeAtPos(CleanPos,true);
|
||||
StartPos:=FindStartOfTerm(CleanPos,NodeTermInType(Node));
|
||||
if StartPos<1 then exit;
|
||||
if WithPostTokens then
|
||||
EndPos:=FindEndOfTerm(CleanPos,false,WithAsOperator)
|
||||
else begin
|
||||
EndPos:=FindEndOfTerm(CleanPos,false,WithAsOperator);
|
||||
if not WithPostTokens then begin
|
||||
MoveCursorToCleanPos(CleanPos);
|
||||
ReadNextAtom;
|
||||
EndPos:=CurPos.EndPos;
|
||||
if CurPos.EndPos<EndPos then
|
||||
EndPos:=CurPos.EndPos;
|
||||
end;
|
||||
if EndPos<1 then exit;
|
||||
Operand:=ExtractCode(StartPos,EndPos,[phpCommentsToSpace]);
|
||||
|
Loading…
Reference in New Issue
Block a user