diff options
author | Felipe Heidrich | 2004-03-24 18:24:37 +0000 |
---|---|---|
committer | Felipe Heidrich | 2004-03-24 18:24:37 +0000 |
commit | 7305fa14298b9e2835b2a0e3494cc133fce11f25 (patch) | |
tree | 0e4420e873535a9f00fda9c6f7d085cd4707a7f3 | |
parent | df4d6d106e094ff2808d5b3dc5f4b3e87be5d087 (diff) | |
download | eclipse.platform.swt-7305fa14298b9e2835b2a0e3494cc133fce11f25.tar.gz eclipse.platform.swt-7305fa14298b9e2835b2a0e3494cc133fce11f25.tar.xz eclipse.platform.swt-7305fa14298b9e2835b2a0e3494cc133fce11f25.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java index abfdebac4e..ff1b40f8e9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java @@ -59,6 +59,7 @@ void checkLayout () { } int stringWidth (StyleItem run, char[] ch) { + if (ch.length == 0) return 0; int fontList = getItemFont(run).handle; byte[] buffer = Converter.wcsToMbcs(null, ch, true); int xmString = OS.XmStringCreateLocalized(buffer); @@ -505,7 +506,6 @@ public Point getLocation (int offset, int trailing) { if (isTrailing) offset++; char[] chars = new char[offset - run.start]; text.getChars(run.start, offset, chars, 0); -// String string = text.substring(run.start, offset); width += stringWidth(run, chars); } result = new Point(width, lineY[line]); |