IDE: identifier completion: always move cursor in front of semicolon

git-svn-id: trunk@15784 -
This commit is contained in:
mattias 2008-07-14 22:21:35 +00:00
parent 4732844584
commit 588edd1cab
2 changed files with 3 additions and 5 deletions

View File

@ -1523,8 +1523,7 @@ begin
CurrentIdentifierList.ContextFlags:=
CurrentIdentifierList.ContextFlags+[ilcfStartIsLValue];
end;
if UpAtomIs('IF') or UpAtomIs('FOR') or UpAtomIs('DO')
or UpAtomIs('CASE') or UpAtomIs('OF') or UpAtomIs('WHILE') then begin
if UpAtomIs('IF') or UpAtomIs('CASE') or UpAtomIs('WHILE') then begin
CurrentIdentifierList.ContextFlags:=
CurrentIdentifierList.ContextFlags+[ilcfIsExpression];
end;

View File

@ -511,6 +511,7 @@ begin
Result:=Result+' := ';
CursorAtEnd:=false;
end;}
if CursorAtEnd then ;
// add assignment operator :=
if (ilcfStartIsLValue in IdentList.ContextFlags)
@ -534,9 +535,7 @@ begin
if (ilcfNeedsEndSemicolon in IdentList.ContextFlags)
and CodeToolsOpts.IdentComplAddSemicolon then begin
Result:=Result+';';
if (not CursorAtEnd) or IdentItem.HasChilds
or ([ilcfStartIsLValue,ilcfIsExpression]*IdentList.ContextFlags<>[]) then
inc(CursorToLeft);
inc(CursorToLeft);
end;
//DebugLn(['GetIdentCompletionValue END Result="',Result,'"']);