mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 10:35:58 +02:00
codetools: fixed FindStartOfTerm ignoring next atom if it is not under EndPos
git-svn-id: trunk@22399 -
This commit is contained in:
parent
db15a33457
commit
dae3bc507c
@ -5929,7 +5929,8 @@ begin
|
||||
StartPos:=FindStartOfAtom(Src,EndPos);
|
||||
MoveCursorToCleanPos(StartPos);
|
||||
NextAtom:=CurPos;
|
||||
ReadNextAtom;
|
||||
if not IsSpaceChar[Src[StartPos]] then
|
||||
ReadNextAtom;
|
||||
NextAtomType:=GetCurrentAtomType;
|
||||
repeat
|
||||
ReadPriorAtom;
|
||||
@ -6048,9 +6049,10 @@ var
|
||||
begin
|
||||
Result:=false;
|
||||
if StartPos<1 then
|
||||
StartPos:=FindStartOfTerm(EndPos-1,NodeTermInType(Params.ContextNode))
|
||||
StartPos:=FindStartOfTerm(EndPos,NodeTermInType(Params.ContextNode))
|
||||
else if EndPos<1 then
|
||||
EndPos:=FindEndOfTerm(StartPos,true,WithAsOperator);
|
||||
//DebugLn(['InitAtomQueue StartPos=',StartPos,'=',dbgstr(copy(Src,StartPos,10)),' EndPos=',dbgstr(copy(Src,EndPos,10))]);
|
||||
if (StartPos<1) then
|
||||
RaiseInternalError;
|
||||
if StartPos>SrcLen then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user