Fixed django file completion in unicode strings (PY-5998).

This commit is contained in:
Dmitry Trofimov
2012-04-03 14:58:02 +02:00
parent 2bdc0b05fb
commit eef0fdab89
@@ -151,7 +151,7 @@ public class StringUtil extends StringUtilRt {
i = i1 + oldS.length();
}
}
return newText!= null ? newText.toString():"";
return newText != null ? newText.toString() : "";
}
/**
@@ -1917,13 +1917,14 @@ public class StringUtil extends StringUtilRt {
int slashRIndex = -1;
if (chars != null) {
for(int i = 0, len = s.length(); i < len; ++i) {
for (int i = 0, len = s.length(); i < len; ++i) {
if (chars[i] == '\r') {
slashRIndex = i;
break;
}
}
} else {
}
else {
for (int i = 0, len = s.length(); i < len; i++) {
if (s.charAt(i) == '\r') {
slashRIndex = i;
@@ -1933,7 +1934,8 @@ public class StringUtil extends StringUtilRt {
}
if (slashRIndex != -1) {
String context = String.valueOf(last(s.subSequence(0, slashRIndex), 10, true)) + first(s.subSequence(slashRIndex, s.length()), 10, true);
String context =
String.valueOf(last(s.subSequence(0, slashRIndex), 10, true)) + first(s.subSequence(slashRIndex, s.length()), 10, true);
context = escapeStringCharacters(context);
LOG.error("Wrong line separators: '" + context + "' at offset " + slashRIndex);
}