Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2019-11-21 16:10:24 +0000
committerAndrey Loskutov2019-11-21 16:46:45 +0000
commit5e10cc37deefc6d92f881b25b74c8e0038b74bf1 (patch)
treee8cb92fe780df49690e2315f66da340c55e0e730
parent949794765176a44045b169c2184026c3e425f151 (diff)
downloadeclipse.platform.text-5e10cc37deefc6d92f881b25b74c8e0038b74bf1.tar.gz
eclipse.platform.text-5e10cc37deefc6d92f881b25b74c8e0038b74bf1.tar.xz
eclipse.platform.text-5e10cc37deefc6d92f881b25b74c8e0038b74bf1.zip
Bug 553319 - IllegalArgumentException viaI20191122-1800
LineNumberRulerColumn.doubleBufferPaint Trying to avoid negative values for bufferH / bufferY. Change-Id: Idb3f6e37affb7292ceb9cfebd80b3121a74f0ee1 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-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