Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Thienel2016-06-18 10:27:44 -0400
committerFlorian Thienel2016-06-18 10:27:44 -0400
commit9c808b4700fa9a3760a4f2f1810b5caaf5ff6097 (patch)
treedad3d8d4dd6da797ace550293bee90317ff7164c
parent330d68b8cc56719ae8d1bfcc2bd4d93895d7ad30 (diff)
downloadorg.eclipse.mylyn.docs.vex-9c808b4700fa9a3760a4f2f1810b5caaf5ff6097.tar.gz
org.eclipse.mylyn.docs.vex-9c808b4700fa9a3760a4f2f1810b5caaf5ff6097.tar.xz
org.eclipse.mylyn.docs.vex-9c808b4700fa9a3760a4f2f1810b5caaf5ff6097.zip
handle problem when box is to small to show any text
Signed-off-by: Florian Thienel <florian@thienel.org>
-rw-r--r--org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TextContent.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TextContent.java b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TextContent.java
index b4505791..22f2bdce 100644
--- a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TextContent.java
+++ b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/TextContent.java
@@ -125,6 +125,9 @@ public class TextContent extends BaseBox implements IInlineBox, IContentBox {
}
public String getText() {
+ if (startPosition.getOffset() > endPosition.getOffset()) {
+ return "";
+ }
return content.getText(new ContentRange(startPosition.getOffset(), endPosition.getOffset()));
}

Back to the top