Greetings Sergey,
Sorry let me combine my posts and make it clearer.
Code: Select all
GCRVE := RichViewEdit.TopLevelEditor;
//A user selects a portion of text right after a bullet point.
RVGetSelection(GCRVE, LinearStarPos, LinearLen, 2);//Get the Selection in linear instead of Bounds.
If VariableTrue then
begin
ms := TMemoryStream.Create;
RichViewEdit.SaveRVFToStream(ms,True);
ms.Position := 0;
//Now switch to TempRVE
TempRVE.LoadRVFFromStream(ms);
TempRVE.Format;
ms.Clear;
GRichViewEdit := TempRVE;
GRichViewEdit.Style := TempRVE.Style; //Use incoming style
GCRVE := TempRVE.TopLevelEditor;
GCRVE.SelectAll;
//It seems like if I do (This function instead of SelectAll it works better)
//RVSetSelection(GCRVE, 0, Abs(LinearLen), 2);
end;
RVGetSelection(GCRVE, StartInt, LenInt, 2);
If VariableTrue it uses a method to copy to a tempRichViewEdit and then to another for various reasons.
However, that process causes LenInt in RVGetSelection to be +1 in Length for example 13. If I turn VariableTrue = False and ignore this section then RVGetSelection LenInt = 12 it does not have the +1.
(I know it shifts between about 4 different RichViewEdits. There are odd reasons for that I probably could change that but ignoring that for now.)
I am thinking that the bullet point is partially getting copied somehow?