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;