Skip to content

Commit 1393b33

Browse files
committed
bk/2024-09-16-1743
1 parent df0c204 commit 1393b33

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Src/CodeCompletion/DelphiAIDev.CodeCompletion.KeyTab.pas

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,23 @@ constructor TDelphiAIDevCodeCompletionKeyTab.Create;
3939
procedure TDelphiAIDevCodeCompletionKeyTab.Process(const AContext: IOTAKeyContext);
4040
var
4141
i: Integer;
42+
LTextLine: string;
4243
begin
4344
try
4445
if FVars.Contents.Count > 1 then
4546
AContext.EditBuffer.EditPosition.Delete(Pred(FVars.Contents.Count));
4647

4748
for i := 0 to Pred(FVars.Contents.Count) do
4849
begin
49-
AContext.EditBuffer.EditPosition.MoveEOL;
50-
AContext.EditBuffer.EditPosition.InsertText(FVars.Contents[i] + sLineBreak);
50+
LTextLine := FVars.Contents[i].Trim;
51+
52+
if FVars.Contents.Count > 1 then
53+
begin
54+
AContext.EditBuffer.EditPosition.MoveEOL;
55+
LTextLine := FVars.Contents[i];
56+
end;
57+
58+
AContext.EditBuffer.EditPosition.InsertText(LTextLine + sLineBreak);
5159
end;
5260
finally
5361
FVars.Clear;

Src/Test/DelphiAIDev.Test.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ TDelphiAIDevTest = class
2525
property Apelido: string read FApelido write FApelido;
2626
property Cep: Integer read FCep write FCep;
2727
procedure Clear;
28-
2928
end;
3029

3130
implementation
3231

3332
procedure TDelphiAIDevTest.Clear;
3433
begin
34+
3535
end;
3636

3737
end.

0 commit comments

Comments
 (0)