Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2014-09-04 18:14:53 +0000
committerDani Megert2014-09-04 18:14:53 +0000
commit48d5795649f8fc6d197a63c1676ec462991f9c5f (patch)
treec4c711bb623059fbc9cdda933437ee2fb9d84369
parentba286b2b25cdecaf5c8f433ee7318530f4f02d21 (diff)
downloadeclipse.platform.text-48d5795649f8fc6d197a63c1676ec462991f9c5f.tar.gz
eclipse.platform.text-48d5795649f8fc6d197a63c1676ec462991f9c5f.tar.xz
eclipse.platform.text-48d5795649f8fc6d197a63c1676ec462991f9c5f.zip
Fixed bug 442170: NPE in org.eclipse.jface.text.PaintManager.PositionManager.managePositionI20140914-2000I20140909-1315I20140909-1115I20140909-1000I20140909-0800
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
index d65e70a8680..e8157155b5f 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -177,6 +177,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener {
if (redraw)
handleDrawRequest(null);
}
+ fPreviousSelection= null;
}
/*
@@ -327,7 +328,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener {
boolean lengthChanged= length != fPreviousLengthOfDocument;
fPreviousLengthOfDocument= length;
- if (reason != IPainter.CONFIGURATION && fSourceViewer.getDocument() == document && !lengthChanged && selection.equals(fPreviousSelection)) {
+ if (reason != IPainter.CONFIGURATION && fSourceViewer.getDocument() == document && !lengthChanged && (selection.equals(fPreviousSelection) || fPreviousSelection == null)) {
return;
}

Back to the top