mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 04:19:47 +02:00
codetools: beautifier: do not split line in the point at some previous line and not after line break, patch #27671 form Anton
git-svn-id: trunk@48343 -
This commit is contained in:
parent
b981df5ee5
commit
d40e78e415
@ -1337,7 +1337,7 @@ begin
|
||||
|
||||
// start new line if necessary
|
||||
if (LastLineEndInAtom<1) and (CurLineLen+length(NewAtom)>LineLength)
|
||||
and (LastSplitPos>1) then begin
|
||||
and (LastSplitPos>LastSrcLineStart) then begin
|
||||
// new atom does not fit into the line and there is a split position
|
||||
// -> split line
|
||||
//DebugLn(['[TBeautifyCodeOptions.AddAtom] NEW LINE CurLineLen=',CurLineLen,' NewAtom="',dbgstr(NewAtom),'" LastSplitPos="',dbgstr(copy(CurCode,LastSplitPos-5,5))+'|'+dbgstr(copy(CurCode,LastSplitPos,5)),'" LineLength=',LineLength]);
|
||||
@ -1789,7 +1789,7 @@ begin
|
||||
end;
|
||||
|
||||
if (not (CurAtomType in DoNotSplitLineInFront))
|
||||
and (not (LastAtomType in DoNotSplitLineAfter))
|
||||
and (not (LastAtomType in DoNotSplitLineAfter+[atNewLine]))
|
||||
and (CommentLvl=0) then
|
||||
LastSplitPos:=length(Result)+1;
|
||||
{DebugLn('SPLIT LINE CurPos='+dbgs(CurPos)+' CurAtom="'+CurAtom+'"'
|
||||
|
Loading…
Reference in New Issue
Block a user