Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
index 89e243fafc..46926f5ec9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
@@ -319,9 +319,15 @@ void computeRuns (GC gc) {
if (start == 0 && i != lineStart && !run.tab) {
run = allRuns[--i];
} else if (start <= 0 && i == lineStart) {
- i = firstIndice;
- run = allRuns[i];
- start = Math.max(1, firstStart);
+ if (lineWidth == wrapWidth && firstIndice > 0) {
+ i = firstIndice - 1;
+ run = allRuns[i];
+ start = run.length;
+ } else {
+ i = firstIndice;
+ run = allRuns[i];
+ start = Math.max(1, firstStart);
+ }
}
breakRun(run);
while (start < run.length) {

Back to the top