Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hiesserich2015-06-24 16:32:01 +0000
committerCarsten Hiesserich2015-06-24 17:46:01 +0000
commit0daf61eedf8b57fc45bf8ddd6bf884ee8ec14234 (patch)
tree822b4310600300c7eb57ea501235efcbf9ab6790 /org.eclipse.vex.ui/src
parent436938603dc178fcc587f39d348c9b557e82f015 (diff)
downloadorg.eclipse.mylyn.docs.vex-0daf61eedf8b57fc45bf8ddd6bf884ee8ec14234.tar.gz
org.eclipse.mylyn.docs.vex-0daf61eedf8b57fc45bf8ddd6bf884ee8ec14234.tar.xz
org.eclipse.mylyn.docs.vex-0daf61eedf8b57fc45bf8ddd6bf884ee8ec14234.zip
bug 470335: NPE when document is edited in other editor
This bug was caused by calling the ContentPosition constructor with a null document. The same call was used in some other places that are also fixed with this change. There are also some additional tests. Change-Id: Ife8841dff0e38e360b7da0dd26b15cb0169989d4 Signed-off-by: Carsten Hiesserich <carsten.hie@gmail.com>
Diffstat (limited to 'org.eclipse.vex.ui/src')
-rw-r--r--org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/editor/VexEditor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/editor/VexEditor.java b/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/editor/VexEditor.java
index b0695566..37603980 100644
--- a/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/editor/VexEditor.java
+++ b/org.eclipse.vex.ui/src/org/eclipse/vex/ui/internal/editor/VexEditor.java
@@ -805,7 +805,7 @@ public class VexEditor extends EditorPart {
final INode nodeAtCaret = reader.getNodeAtCaret();
if (nodeAtCaret != null) {
final int offsetInNode = Math.min(nodeAtCaret.getStartOffset() + positionOfCurrentNode.getOffsetInNode(), nodeAtCaret.getEndOffset());
- vexWidget.moveTo(new ContentPosition(null, offsetInNode));
+ vexWidget.moveTo(new ContentPosition(document, offsetInNode));
}
loaded = true;

Back to the top