decompiler: fixed bytecode mapping for anonymous classes
This commit is contained in:
@@ -115,7 +115,7 @@ public class TextBuffer {
|
||||
while (currentLine < srcLines.length) {
|
||||
String line = srcLines[currentLine];
|
||||
int lineEnd = currentLineStartOffset + line.length() + myLineSeparator.length();
|
||||
if (markOffset >= currentLineStartOffset && markOffset <= lineEnd) {
|
||||
if (markOffset <= lineEnd) {
|
||||
int requiredLine = markLine - 1;
|
||||
int linesToAdd = requiredLine - dumpedLines;
|
||||
dumpedLines = requiredLine;
|
||||
@@ -223,6 +223,14 @@ public class TextBuffer {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int countLines() {
|
||||
return countLines(0);
|
||||
}
|
||||
|
||||
public int countLines(int from) {
|
||||
return count(myLineSeparator, from);
|
||||
}
|
||||
|
||||
public int count(String substring, int from) {
|
||||
int count = 0, length = substring.length(), p = from;
|
||||
while ((p = myStringBuilder.indexOf(substring, p)) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user