editor, only handle first byte of UTF char, maybe related to #175

since we test for ascii value only
This commit is contained in:
Basile Burg 2017-08-16 10:41:48 +02:00
parent dae1d4c430
commit 462214cec3
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 5 additions and 5 deletions

View File

@ -2369,15 +2369,15 @@ procedure TCESynMemo.completionCodeCompletion(var value: string;
begin begin
if (KeyChar[1] = ' ') then if (KeyChar[1] = ' ') then
begin begin
value := sourceValue + KeyChar; value := sourceValue + KeyChar[1];
end end
else else
begin begin
fLastCompletion := value; fLastCompletion := value;
if KeyChar[1] in fCloseCompletionCharsWithSpace then if KeyChar[1] in fCloseCompletionCharsWithSpace then
value += ' ' + KeyChar value += ' ' + KeyChar[1]
else if KeyChar[1] in fCloseCompletionChars then else if KeyChar[1] in fCloseCompletionChars then
value += KeyChar; value += KeyChar[1];
end; end;
end; end;
@ -3099,9 +3099,9 @@ end;
procedure TCESynMemo.UTF8KeyPress(var Key: TUTF8Char); procedure TCESynMemo.UTF8KeyPress(var Key: TUTF8Char);
var var
c: TUTF8Char; c: AnsiChar;
begin begin
c := Key; c := Key[1];
inherited; inherited;
fCanDscan := true; fCanDscan := true;
case c of case c of