fix #175 - space or space-and-char ransomly inserted after completion

This commit is contained in:
Basile Burg 2017-08-23 07:49:37 +02:00
parent fa3ce3dfd3
commit cc5661d623
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 11 additions and 10 deletions

View File

@ -2368,10 +2368,10 @@ procedure TCESynMemo.completionCodeCompletion(var value: string;
SourceValue: string; var SourceStart, SourceEnd: TPoint; KeyChar: TUTF8Char;
Shift: TShiftState);
begin
if (KeyChar[1] = ' ') then
if KeyChar <> '' then
begin
value := sourceValue + KeyChar[1];
end
if KeyChar[1] = ' ' then
value := sourceValue + KeyChar[1]
else
begin
fLastCompletion := value;
@ -2381,6 +2381,7 @@ begin
value += KeyChar[1];
end;
end;
end;
procedure TCESynMemo.completionFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin