@@ -845,7 +845,7 @@ void drawInPixels (GC gc, int xInPoints, int yInPoints, int selectionStart, int
845845 int drawYWithLineHeight = DPIUtil .scaleUp (getDevice (), yInPoints + lineY [line +1 ] - lineSpacingInPoints , getZoom (gc ));
846846 int drawYWithLineHeightWithSpacing = DPIUtil .scaleUp (getDevice (), yInPoints + lineY [line +1 ], getZoom (gc ));
847847 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 ;
849849 //Draw last line selection
850850 boolean extents = false ;
851851 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
873873 Gdip .Graphics_FillRectangle (gdipGraphics , gdipSelBackground , drawX + lineWidthInPixels [line ], drawY , width , lineHeightWithSpacing );
874874 } else {
875875 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 );
877877 }
878878 }
879879 }
0 commit comments