diff options
author | Felipe Heidrich | 2007-09-06 19:37:14 +0000 |
---|---|---|
committer | Felipe Heidrich | 2007-09-06 19:37:14 +0000 |
commit | 1de9af6c405fe7bc81a6b1df47f0743e5fa8ba91 (patch) | |
tree | 82823b08010061d435ee20772ee82aed5fe5beff | |
parent | d8947875759e0246ff44218b206ca9e13a5e628d (diff) | |
download | eclipse.platform.swt-1de9af6c405fe7bc81a6b1df47f0743e5fa8ba91.tar.gz eclipse.platform.swt-1de9af6c405fe7bc81a6b1df47f0743e5fa8ba91.tar.xz eclipse.platform.swt-1de9af6c405fe7bc81a6b1df47f0743e5fa8ba91.zip |
Bug 116854 StyledText with SWT.WRAP cuts last character of wrapped line
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java | 12 |
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) { |