mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed django file completion in unicode strings (PY-5998).
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user