mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 05:29:29 +02:00
codetools: remove unit from uses section: removing space around first unit
git-svn-id: trunk@19367 -
This commit is contained in:
parent
4982d4b884
commit
c774737bb2
@ -741,8 +741,11 @@ begin
|
|||||||
UsesNode.StartPos,UsesNode.EndPos,'') then exit;
|
UsesNode.StartPos,UsesNode.EndPos,'') then exit;
|
||||||
end else begin
|
end else begin
|
||||||
// not last unit -> delete with comma behind
|
// 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,
|
if not SourceChangeCache.Replace(gtNone,gtNone,
|
||||||
StartPos,CurPos.EndPos,'') then exit;
|
StartPos,EndPos,'') then exit;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
// not first unit in uses section -> delete with comma in front
|
// not first unit in uses section -> delete with comma in front
|
||||||
|
Loading…
Reference in New Issue
Block a user