diff options
author | Carsten Hiesserich | 2015-06-24 16:32:01 +0000 |
---|---|---|
committer | Carsten Hiesserich | 2015-06-24 17:46:01 +0000 |
commit | 0daf61eedf8b57fc45bf8ddd6bf884ee8ec14234 (patch) | |
tree | 822b4310600300c7eb57ea501235efcbf9ab6790 /org.eclipse.vex.ui/src | |
parent | 436938603dc178fcc587f39d348c9b557e82f015 (diff) | |
download | org.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.java | 2 |
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; |