move cursor either to end offset or select the content of the INode

Signed-off-by: Florian Thienel <florian@thienel.org>
diff --git a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/widget/DocumentEditor.java b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/widget/DocumentEditor.java
index 596b95e..3c52460 100644
--- a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/widget/DocumentEditor.java
+++ b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/widget/DocumentEditor.java
@@ -348,10 +348,10 @@
 	public void selectContentOf(final INode node) {
 		if (node.isEmpty()) {
 			cursor.move(toOffset(node.getEndOffset()));
+		} else {
+			cursor.move(toOffset(node.getStartOffset() + 1));
+			cursor.select(toOffset(node.getEndOffset()));
 		}
-
-		cursor.move(toOffset(node.getStartOffset() + 1));
-		cursor.select(toOffset(node.getEndOffset()));
 	}
 
 	@Override