Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian de Alwis2015-08-08 03:00:31 +0000
committerNiraj Modi2015-08-27 12:14:58 +0000
commit5a79c3e65a59cceee29d76c03249fe0d5f9ed374 (patch)
tree725919b963b6dd3a74216911f46d3294db8116b0 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse
parent2322b07a7b8cd0178edfb09393c7510900d87b43 (diff)
downloadeclipse.platform.swt-5a79c3e65a59cceee29d76c03249fe0d5f9ed374.tar.gz
eclipse.platform.swt-5a79c3e65a59cceee29d76c03249fe0d5f9ed374.tar.xz
eclipse.platform.swt-5a79c3e65a59cceee29d76c03249fe0d5f9ed374.zip
Bug 408833 - StyledText hides last character of wrapped line
Fix line-break algorithm in the case where a soft-break or line-break cannot be found: if some text has been added for the line, but we cannot fit even the first character of the run, then don't include the first character of the run. Signed-Off-By: Brian de Alwis <bsd@mt.ca>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java2
1 files changed, 1 insertions, 1 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 ee25e39198..a71f846867 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
@@ -333,7 +333,7 @@ void computeRuns (GC gc) {
run = allRuns[--i];
start = run.length;
} else if (start <= 0 && i == lineStart) {
- if (lineWidth == wrapWidth && firstIndice > 0) {
+ if (lineWidth > 0 && firstIndice > 0 && firstStart == 0) {
i = firstIndice - 1;
run = allRuns[i];
start = run.length;

Back to the top