diff options
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java')
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java index 15b3029ec2b..a086fa2661e 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java @@ -364,18 +364,18 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { thumbHeight= verticalBar != null ? Math.max(Math.min(bounds.height, verticalBar.getThumbBounds().height), 0) : 0; } - int partialTopIndex= JFaceTextUtil.getPartialTopIndex(textWidget); - int topLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialTopIndex)); - int topLinePixel= textWidget.getLinePixel(partialTopIndex); - double topIndex= partialTopIndex - (double) topLinePixel / topLineHeight; - - int partialBottomIndex= JFaceTextUtil.getPartialBottomIndex(textWidget); - int bottomLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialBottomIndex)); - int bottomLinePixel= textWidget.getLinePixel(partialBottomIndex); - double bottomIndex= partialBottomIndex - ((double) bottomLinePixel - textWidget.getClientArea().height) / bottomLineHeight; - - visibleLines= bottomIndex - topIndex; - invisibleLines= maxLines - visibleLines; + int partialTopIndex= JFaceTextUtil.getPartialTopIndex(textWidget); + int topLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialTopIndex)); + int topLinePixel= textWidget.getLinePixel(partialTopIndex); + double topIndex= partialTopIndex - (double) topLinePixel / topLineHeight; + + int partialBottomIndex= JFaceTextUtil.getPartialBottomIndex(textWidget); + int bottomLineHeight= textWidget.getLineHeight(textWidget.getOffsetAtLine(partialBottomIndex)); + int bottomLinePixel= textWidget.getLinePixel(partialBottomIndex); + double bottomIndex= partialBottomIndex - ((double) bottomLinePixel - textWidget.getClientArea().height) / bottomLineHeight; + + visibleLines= bottomIndex - topIndex; + invisibleLines= maxLines - visibleLines; } } |