codetools: remove unit from uses section: removing space around first unit

git-svn-id: trunk@19367 -
This commit is contained in:
mattias 2009-04-12 04:57:27 +00:00
parent 4982d4b884
commit c774737bb2

View File

@ -741,8 +741,11 @@ begin
UsesNode.StartPos,UsesNode.EndPos,'') then exit;
end else begin
// not last unit -> delete with comma behind
EndPos:=FindLineEndOrCodeAfterPosition(CurPos.EndPos);
if (EndPos>SrcLen) or (Src[EndPos] in [#10,#13]) then
StartPos:=FindLineEndOrCodeInFrontOfPosition(StartPos);// delete space in front or even the empty line
if not SourceChangeCache.Replace(gtNone,gtNone,
StartPos,CurPos.EndPos,'') then exit;
StartPos,EndPos,'') then exit;
end;
end else begin
// not first unit in uses section -> delete with comma in front