Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
index f7654cd22..1e2098486 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
@@ -715,9 +715,15 @@ public class LineNumberRulerColumn implements IVerticalRulerColumn {
// Dont copy empty pixels from last time.
goodPixels= fLastHeight;
}
- bufferGC.copyArea(0, dy, size.x, goodPixels - dy, 0, 0);
- bufferY= goodPixels - dy;
- bufferH= height - bufferY;
+ if (dy < goodPixels) {
+ bufferGC.copyArea(0, dy, size.x, goodPixels - dy, 0, 0);
+ bufferY= goodPixels - dy;
+ bufferH= height - bufferY;
+ } else {
+ // Redraw everything.
+ height= size.y;
+ dy= 0;
+ }
} else if (dy < 0 && -dy < height) {
bufferGC.copyArea(0, 0, size.x, height + dy, 0, -dy);
bufferY= 0;

Back to the top