From 15cde7a9883c09c1f3558205f241398a501dbac0 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 7 Jun 2019 17:29:16 +0000 Subject: [PATCH] SynEdit: Fix position for IME (e.g. Candidate window). Requests are received before "StartComposition". Issue #0035682 git-svn-id: trunk@61340 - --- components/synedit/lazsynimm.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/synedit/lazsynimm.pas b/components/synedit/lazsynimm.pas index fe472eabec..eecab5e260 100644 --- a/components/synedit/lazsynimm.pas +++ b/components/synedit/lazsynimm.pas @@ -568,6 +568,8 @@ begin IMR_QUERYCHARPOSITION: begin cp := PIMECHARPOSITION(Msg.lParam); p1 := FImeBlockSelection.StartLineBytePos; + if not FInCompose then + p1 := CaretObj.LineBytePos; CWidth := ViewedTextBuffer.GetPhysicalCharWidths(FImeBlockSelection.StartLinePos - 1); x := p1.x - 1;