Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Thienel2016-01-28 13:28:31 -0500
committerFlorian Thienel2016-01-28 13:28:31 -0500
commit9d53249b1cda94482f2ece39ca5e857419683a0c (patch)
tree6614116cc6a159cd80821244937c8ff61aa288f8
parentb43d82803a437fb58422db2aab4de61fb477092b (diff)
downloadorg.eclipse.mylyn.docs.vex-9d53249b1cda94482f2ece39ca5e857419683a0c.tar.gz
org.eclipse.mylyn.docs.vex-9d53249b1cda94482f2ece39ca5e857419683a0c.tar.xz
org.eclipse.mylyn.docs.vex-9d53249b1cda94482f2ece39ca5e857419683a0c.zip
fix splitting for very narrow view ports
Signed-off-by: Florian Thienel <florian@thienel.org>
-rw-r--r--org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/InlineNodeReference.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/InlineNodeReference.java b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/InlineNodeReference.java
index f408813b..e42d992f 100644
--- a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/InlineNodeReference.java
+++ b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/boxes/InlineNodeReference.java
@@ -422,10 +422,10 @@ public class InlineNodeReference extends BaseBox implements IInlineBox, IDecorat
}
final int offsetOfFirstChildInTail = findStartOffset(tail.getComponent());
- final int splitPosition;
+ int splitPosition;
if (offsetOfFirstChildInTail == -1) {
splitPosition = endPosition.getOffset();
- } else if (offsetOfFirstChildInTail == oldOffsetOfFirstChild && width == 0) {
+ } else if (offsetOfFirstChildInTail == oldOffsetOfFirstChild && (width == 0 || offsetOfFirstChildInTail > endPosition.getOffset())) {
splitPosition = startPosition.getOffset();
} else {
splitPosition = offsetOfFirstChildInTail;

Back to the top