git-svn-id: branches/fixes_1_4@48499 -

This commit is contained in:
martin 2015-03-24 23:42:37 +00:00
parent 0b28695ffe
commit d71675e64f

View File

@ -313,9 +313,12 @@ begin
GetMem(p, ImeCount + 2);
try
TCustomSynEdit(FriendEdit).BeginUpdate;
if SelectionObj.SelAvail and (not SelectionObj.Persistent) and (eoOverwriteBlock in TSynEdit(FriendEdit).Options2) then
SelectionObj.SelText := '';
ImmGetCompositionStringW(imc, GCS_RESULTSTR, p, ImeCount + 2);
p[ImeCount] := #0;
p[ImeCount+1] := #0;
FImeBlockSelection.StartLineBytePos := CaretObj.LineBytePos;
FImeBlockSelection.SelText := UTF16ToUTF8(PWCHAR(p));
FImeBlockSelection.StartLineBytePos := FImeBlockSelection.EndLineBytePos;
CaretObj.LineBytePos := FImeBlockSelection.StartLineBytePos;
@ -702,6 +705,9 @@ end;
procedure LazSynImeFull.WMImeStartComposition(var Msg: TMessage);
begin
//debugln(['TCustomSynEdit.WMImeStartComposition ']);
if SelectionObj.SelAvail and (not SelectionObj.Persistent) and (eoOverwriteBlock in TSynEdit(FriendEdit).Options2) then
SelectionObj.SelText := '';
FImeBlockSelection.StartLineBytePos := CaretObj.LineBytePos;
FInCompose := True;
Msg.Result := 1;