I noticed that even this fails:
SynEdit1.SelStart := SynEdit1.SelStart;
The problem is that the cursor position is set to the left with every execution because the linebreak characters are ignored when calculating the character indexes (in SynEditTextBuffers.pas). Here is the corrected version:
i, n : Integer;
p : PSynEditStringRec;
if fCount=0 then Exit;
for i:=1 to fCount do begin
Inc(n, Length(p.FString) + 2); // changed, before it was without "+ 2"
I don't know whether this works always, because I don't know if we have always 2 linebreak characters in SynEdit. For me this works fine.
Can somebody please check this and change it in the repository?
Log in to post a comment.