From 453439b6b855fd668efeb5d5da446bb996dc0a83 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 17 Dec 2010 13:56:04 +0000 Subject: [PATCH] 1.1 compat --- src/jalview/datamodel/ColumnSelection.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/jalview/datamodel/ColumnSelection.java b/src/jalview/datamodel/ColumnSelection.java index 0bcbd5b..589c19b 100644 --- a/src/jalview/datamodel/ColumnSelection.java +++ b/src/jalview/datamodel/ColumnSelection.java @@ -1181,9 +1181,16 @@ public class ColumnSelection sq = sq + sb; while ((diff = spos + offset - sq.length() - 1) > 0) { - sq = sq - + ((diff >= sb.length()) ? sb.toString() : sb - .substring(0, diff)); + //sq = sq + // + ((diff >= sb.length()) ? sb.toString() : sb + // .substring(0, diff)); + if (diff>=sb.length()) { + sq+=sb.toString(); + } else { + char[] buf = new char[diff]; + sb.getChars(0, diff, buf, 0); + sq+=buf.toString(); + } } } sq += sb.toString(); -- 1.7.10.2