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; SourceValue: string; var SourceStart, SourceEnd: TPoint; KeyChar: TUTF8Char;
Shift: TShiftState); Shift: TShiftState);
begin begin
if (KeyChar[1] = ' ') then if KeyChar <> '' then
begin begin
value := sourceValue + KeyChar[1]; if KeyChar[1] = ' ' then
end value := sourceValue + KeyChar[1]
else else
begin begin
fLastCompletion := value; fLastCompletion := value;
@ -2380,6 +2380,7 @@ begin
else if KeyChar[1] in fCloseCompletionChars then else if KeyChar[1] in fCloseCompletionChars then
value += KeyChar[1]; value += KeyChar[1];
end; end;
end;
end; end;
procedure TCESynMemo.completionFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure TCESynMemo.completionFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);