Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2004-03-24 18:24:37 +0000
committerFelipe Heidrich2004-03-24 18:24:37 +0000
commit7305fa14298b9e2835b2a0e3494cc133fce11f25 (patch)
tree0e4420e873535a9f00fda9c6f7d085cd4707a7f3
parentdf4d6d106e094ff2808d5b3dc5f4b3e87be5d087 (diff)
downloadeclipse.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.java2
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]);

Back to the top