Skip to content

Commit fc18dc6

Browse files
committed
Fixed bug with no code lines for indent
1 parent d19660e commit fc18dc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/VBACHIndent.pas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ procedure IndentCode(ACodeModule: CodeModule; AStartInsPos: Integer;
181181
VBLine: String;
182182
AllLines: TArray<string>;
183183
begin
184+
if AAllCode.Trim = EmptyStr then
185+
Exit;
184186
IndentInitialize;
185187
try
186188
AAllCode := StringReplace(AAllCode, ' _' + sLineBreak, ' ', [rfReplaceAll]);

0 commit comments

Comments
 (0)