Problems with TTMSFMXMemo.SelStart

i'm using the TTMSFMXMemo to display lyrics in a karaoke app for macOS.
To highligh the words to be sung i'm using .SelStart and .SelLength.
To get the values for SelStart so that the selection always begins at the start of a line i do the following:

              setLength(LyricsLineLength, MyMemo.Lines.Count +1);
              LyricsLineLength[0] := 0;
              CharCnt := 0;
              for i := 1 to MyMemo.Lines.Count -1
                  do begin
                  tmpString := MyMemo.Lines[i -1];
                  CharCnt := CharCnt + length(tmpString) + 2; // for #13#10
                  LyricsLineLength := CharCnt;
                  end;

then do the highlight with

              MyMemo.TopLine := tFirstVisibleLine;
              MyMemo.SelStart := LyricsLineLength[tCurrentLine];
              MyMemo.SelLength := SrtCount;

All works as it should, except for some files (lyrics) where the value for LyricsLineLength[CurrentLine] is eg. 2461, but MyMemo.SelStart resets to 0.
What can be the reason for SelStart to not accept the value of 2461 ?

Thanks
Victor
strage, can't find how to edit my prev. post ...

              setLength(LyricsLineLength, MyMemo.Lines.Count +1);
              LyricsLineLength[0] := 0;
              CharCnt := 0;
              for i := 1 to MyMemo.Lines.Count -1
                  do begin
                  tmpString := MyMemo.Lines[i -1];
                  CharCnt := CharCnt + length(tmpString) + 2; // for #13#10
                  LyricsLineLength[ i ] := CharCnt;
                  end;

I have retested this here by loading a text in the memo and then setting the selection with:

begin
  TMSFMXMemo1.SelStart := 2461;
  TMSFMXMemo1.SelLength := 10;
end;

and I cannot see a problem here. There must be more context to this issue, so please check to provide sufficient details to allow to reproduce.
it's not hapening withevery text i load, but it always regarding the last line.
So i added an empty line (a lot of spaces) and it works fine now,

I cannot reproduce this.
This performs text selection in the last line correct:


var
  i:integer;
  lineno: integer;
begin
  tmsfmxmemo1.BeginUpdate;
  for i := 0 to 10 do
    begin
     tmsfmxmemo1.Lines.Add('line '+inttohex(i,4));
    end;
  TMSFMXMemo1.EndUpdate;

  lineno := 10;
  tmsfmxmemo1.SelStart := lineno * 11;
  tmsfmxmemo1.SelLength := 4;
end;