@@ -845,7 +845,7 @@ void drawInPixels (GC gc, int xInPoints, int yInPoints, int selectionStart, int
845
845
int drawYWithLineHeight = DPIUtil .scaleUp (getDevice (), yInPoints + lineY [line +1 ] - lineSpacingInPoints , getZoom (gc ));
846
846
int drawYWithLineHeightWithSpacing = DPIUtil .scaleUp (getDevice (), yInPoints + lineY [line +1 ], getZoom (gc ));
847
847
int lineHeight = DPIUtil .scaleUp (getDevice (), lineY [line +1 ] - lineY [line ] - lineSpacingInPoints , getZoom (gc ));
848
- int lineHeightWithSpacing = DPIUtil . scaleUp ( getDevice (), lineY [ line + 1 ] - lineY [ line ], getZoom ( gc )) ;
848
+ int lineHeightWithSpacing = drawYWithLineHeightWithSpacing - drawY ;
849
849
//Draw last line selection
850
850
boolean extents = false ;
851
851
if ((flags & (SWT .FULL_SELECTION | SWT .DELIMITER_SELECTION )) != 0 && (hasSelection || (flags & SWT .LAST_LINE_SELECTION ) != 0 )) {
@@ -873,7 +873,7 @@ void drawInPixels (GC gc, int xInPoints, int yInPoints, int selectionStart, int
873
873
Gdip .Graphics_FillRectangle (gdipGraphics , gdipSelBackground , drawX + lineWidthInPixels [line ], drawY , width , lineHeightWithSpacing );
874
874
} else {
875
875
OS .SelectObject (hdc , selBackground );
876
- OS .PatBlt (hdc , drawX + lineWidthInPixels [line ], drawY , width , drawYWithLineHeightWithSpacing , OS .PATCOPY );
876
+ OS .PatBlt (hdc , drawX + lineWidthInPixels [line ], drawY , width , lineHeightWithSpacing , OS .PATCOPY );
877
877
}
878
878
}
879
879
}
0 commit comments