codetools: fixed CompleteCode TryAssignment loop

git-svn-id: trunk@56041 -
This commit is contained in:
mattias 2017-10-13 11:00:08 +00:00
parent eb93f4654b
commit ec271131d1

View File

@ -9500,12 +9500,12 @@ function TCodeCompletionCodeTool.CompleteCode(CursorPos: TCodeXYPosition;
var var
OldCodePos: TCodePosition; OldCodePos: TCodePosition;
begin begin
// Search only within the current instruction - stop on semicolon or keywords // Search only within the current statement - stop on semicolon or keywords
// (else isn't prepended by a semicolon in contrast to other keywords). // (else isn't prepended by a semicolon in contrast to other keywords).
Result := False; Result := False;
MoveCursorToCleanPos(CleanCursorPos); MoveCursorToNearestAtom(CleanCursorPos);
while CurPos.StartPos > 0 do while CurPos.StartPos > 1 do
begin begin
ReadPriorAtom; ReadPriorAtom;
case CurPos.Flag of case CurPos.Flag of