Closed MShark67 closed 2 weeks ago
A very tentative change that might fix it. I haven't tested this extensively. In SynEditPrint lines 547-548. I just changed the 1 to a 0 in that second line.
if YPos + LayoutRowCount * FLineHeight >= ClipR.Top then
if (I = FPages[Num - 1].FirstLine) and (FPages[Num - 1].FirstRow > 0) then
-Mark (My environment is in flux right now with the switch to Delphi 12 btw.
@MShark67 Actually the problem is in CalcPages.
The issue should be solved (please confirm) if you replace
if I = iEndLine then
PageLine.LastLine := I;
with
if I = iEndLine then
begin
PageLine.LastLine := I;
PageLine.LastRow := LayoutRowCount;
end;
at the end of the routine. I have applied this and a couple of more fixes of corner cases to the multicaret branch (teaser). They will be eventually merged to master.
Confirming your fix works great and that's quite the teaser! Nicely done!
The multicaret stuff has been moving slowly, so I merged the SynEditPrint changes back to master. Could you please check one more time?
I just noticed this the other day. This can be tested with the TestPP project in the print demo. Just type a single line and don't press enter at the end. Then print preview (or print) and see that the line text does not get printed. If you type more lines, any non-terminated final line will not be in the print preview.