AdvRichEditorBase PrevChar

In the AdvRichEditor i have an exception if you have an the following conditions when using keyboard only

  1. empty editor
  2. Press enter key
  3. Press left arrow key

The exception is in module AdvRichEditorBase.pas and function:
function TAdvRichEditorBase.PrevChar(SelectionUpdate: boolean = true): boolean;

It fails in Line 10317 ch := CharInStr fails due to Caret.Element

if Caret.CharIndex > 0 then
      Result := true;
      ch := CharInStr( (Caret.Element as TTextElement).Text, Caret.CharIndex);
      s := Ord(ch);
      if (s and $D800 = $D800) then
        Caret.CharIndex := Caret.CharIndex - 2
        Caret.CharIndex := Caret.CharIndex - 1;


Anyone seen and fixed this issue ?

We traced & solved this issue. The next update will address this.

1 Like