ecSyntMemo

procedure TCustomSyntaxMemo.PasteFromClipboard;
add var
  PrevPos: TPoint;

after
    if Clipboard.HasFormat(CF_TEXT) then
      begin

add at begin of this block
        PrevPos := CaretPos;

at the end of the same big block, add
        if soKeepCaretPaste in FOptionsEx then
          CaretPos := PrevPos;
      end;
