mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 22:17:06 +02:00
IDE: event assignment completion: fixed using beautify options for RValue
git-svn-id: trunk@12377 -
This commit is contained in:
parent
97e18a00f6
commit
2adfa195f3
@ -5424,7 +5424,7 @@ var CleanCursorPos, Indent, insertPos: integer;
|
||||
then
|
||||
RValue:='@'+RValue;
|
||||
RValue:=':='+RValue;
|
||||
SourceChangeCache.BeautifyCodeOptions.BeautifyStatement(RValue,0);
|
||||
RValue:=SourceChangeCache.BeautifyCodeOptions.BeautifyStatement(RValue,0);
|
||||
StartInsertPos:=AssignmentOperator;
|
||||
EndInsertPos:=SemicolonPos+1;
|
||||
if EndInsertPos<1 then
|
||||
|
@ -1309,23 +1309,26 @@ begin
|
||||
else
|
||||
break;
|
||||
until false;
|
||||
//DebugLn(['TBeautifyCodeOptions.BeautifyStatement ',CurAtom,' LastAtomType=',AtomTypeNames[LastAtomType],',',LastAtomType in DoNotInsertSpaceAfter,',',LastAtomType in DoInsertSpaceAfter,' CurAtomType=',AtomTypeNames[CurAtomType],',',CurAtomType in DoNotInsertSpaceInFront,',',CurAtomType in DoInsertSpaceInFront]);
|
||||
if ((Result='') or (Result[length(Result)]<>' '))
|
||||
and (not (CurAtomType in DoNotInsertSpaceInFront))
|
||||
and (not (LastAtomType in DoNotInsertSpaceAfter))
|
||||
and ((CurAtomType in DoInsertSpaceInFront)
|
||||
or (LastAtomType in DoInsertSpaceAfter))
|
||||
then
|
||||
then begin
|
||||
//DebugLn(['TBeautifyCodeOptions.BeautifyStatement ADDING space']);
|
||||
AddAtom(Result,' ');
|
||||
{if (CurAtomType=atIdentifier) and (LastAtomType=atColon) then begin
|
||||
DebugLn('SPLIT LINE CurPos='+dbgs(CurPos)+' CurAtom="'+CurAtom+'"'
|
||||
end;
|
||||
if (CurAtomType=atIdentifier) and (LastAtomType=atColon) then begin
|
||||
{DebugLn('SPLIT LINE CurPos='+dbgs(CurPos)+' CurAtom="'+CurAtom+'"'
|
||||
+' CurAtomType='+AtomTypeNames[CurAtomType]
|
||||
+' LastAtomType=',AtomTypeNames[LastAtomType]
|
||||
+' CurNot='+dbgs(CurAtomType in DoNotInsertSpaceInFront)
|
||||
+' LastNot='+dbgs(LastAtomType in DoNotInsertSpaceAfter)
|
||||
+' Cur='+dbgs(CurAtomType in DoInsertSpaceInFront)
|
||||
+' Last='+dbgs(LastAtomType in DoInsertSpaceAfter)
|
||||
+' ..."'+copy(Result,length(Result)-10,10)+'"');
|
||||
end;}
|
||||
+' ..."'+copy(Result,length(Result)-10,10)+'"');}
|
||||
end;
|
||||
|
||||
if (not (CurAtomType in DoNotSplitLineInFront))
|
||||
and (not (LastAtomType in DoNotSplitLineAfter)) then
|
||||
|
Loading…
Reference in New Issue
Block a user