mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-02 23:39:29 +02:00
SynEdit: win, IME Handler: Fixed (added) overwrite selection. Issue #0027712
git-svn-id: trunk@48460 -
This commit is contained in:
parent
f63887ca7b
commit
ba0b0b4e7c
@ -313,9 +313,12 @@ begin
|
|||||||
GetMem(p, ImeCount + 2);
|
GetMem(p, ImeCount + 2);
|
||||||
try
|
try
|
||||||
TCustomSynEdit(FriendEdit).BeginUpdate;
|
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);
|
ImmGetCompositionStringW(imc, GCS_RESULTSTR, p, ImeCount + 2);
|
||||||
p[ImeCount] := #0;
|
p[ImeCount] := #0;
|
||||||
p[ImeCount+1] := #0;
|
p[ImeCount+1] := #0;
|
||||||
|
FImeBlockSelection.StartLineBytePos := CaretObj.LineBytePos;
|
||||||
FImeBlockSelection.SelText := UTF16ToUTF8(PWCHAR(p));
|
FImeBlockSelection.SelText := UTF16ToUTF8(PWCHAR(p));
|
||||||
FImeBlockSelection.StartLineBytePos := FImeBlockSelection.EndLineBytePos;
|
FImeBlockSelection.StartLineBytePos := FImeBlockSelection.EndLineBytePos;
|
||||||
CaretObj.LineBytePos := FImeBlockSelection.StartLineBytePos;
|
CaretObj.LineBytePos := FImeBlockSelection.StartLineBytePos;
|
||||||
@ -339,9 +342,6 @@ var
|
|||||||
imc: HIMC;
|
imc: HIMC;
|
||||||
begin
|
begin
|
||||||
//debugln(['TCustomSynEdit.WMImeStartComposition ']);
|
//debugln(['TCustomSynEdit.WMImeStartComposition ']);
|
||||||
if SelectionObj.SelAvail and (not SelectionObj.Persistent) and (eoOverwriteBlock in TSynEdit(FriendEdit).Options2) then
|
|
||||||
SelectionObj.SelText := '';
|
|
||||||
|
|
||||||
imc := ImmGetContext(FriendEdit.Handle);
|
imc := ImmGetContext(FriendEdit.Handle);
|
||||||
if (imc <> 0) then begin
|
if (imc <> 0) then begin
|
||||||
UpdateImeWinFont(imc);
|
UpdateImeWinFont(imc);
|
||||||
|
Loading…
Reference in New Issue
Block a user