From bb765a2605f94794325e83ef845b13ddba0ff220 Mon Sep 17 00:00:00 2001 From: skalogryz Date: Mon, 13 Jan 2020 14:45:00 +0000 Subject: [PATCH] richmemo: preserving richmemo selection on intSaveStream. Patch by Matthew Shaffer. bug #34791 git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7280 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/richmemo/richmemortf.pas | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/richmemo/richmemortf.pas b/components/richmemo/richmemortf.pas index 68d71bef6..c04b21578 100644 --- a/components/richmemo/richmemortf.pas +++ b/components/richmemo/richmemortf.pas @@ -798,9 +798,7 @@ begin isitalic:=false; iscolor:=0; while Assigned(rng) do begin - ARich.SelStart:=rng.textStart; - ARich.SelLength:=rng.textLength; - u:=UTF8Decode(ARich.SelText); + u:=ARich.GetUText(rng.textStart, rng.textLength); RtfOut('\f'+IntToStr(rng.fontId)); RtfOut('\fs'+IntToStr(rng.font.Size*2)); if (fsBold in rng.font.Style) then begin