SynEdit: Wrapped-view, fix painting for non-wrapped lines. Update values for current (sub-)line

(cherry picked from commit 94f2b48f00)
This commit is contained in:
Martin 2025-01-24 20:48:23 +01:00
parent c01af285f4
commit c9fdab8f85

View File

@ -1295,16 +1295,17 @@ var
begin
if (not FCurWrapPage.HasPage) or (FCurWrapPage.StartLine > AWrappedLine) or
(AWrappedLine >= FCurWrapPage.RealEndLine)
then begin
then
FCurWrapPage := FLineMappingView.FLineMappingData.FindPageForWrap(AWrappedLine);
FCurWrappedLine := AWrappedLine;
end;
FCurWrappedLine := AWrappedLine;
if FCurWrapPage.HasPage then
RealIdx := FCurWrapPage.StartLine +
FCurWrapPage.Page.GetOffsetForWrap(AWrappedLine - FCurWrapPage.StartLine - FCurWrapPage.ViewedCountDifferenceBefore, FCurrentWrapSubline)
else
RealIdx := AWrappedLine;
else begin
RealIdx := AWrappedLine;
FCurrentWrapSubline := 0;
end;
inherited SetHighlighterTokensLine(RealIdx, ARealLine, AStartBytePos, ALineByteLen);
end;