#1217 PCode window not in same position as AS window: fixed

This commit is contained in:
honfika@gmail.com
2016-04-12 18:46:50 +02:00
parent 22df5b47a1
commit 32b4834881

View File

@@ -211,6 +211,7 @@ public class HighlightedTextWriter extends GraphTextWriter {
}
}
appendToSb(str);
fixNewLineCount(str);
if (h != null) {
h.len = sb.length() - newLineCount - h.startPos;
}
@@ -338,6 +339,14 @@ public class HighlightedTextWriter extends GraphTextWriter {
sb.append(str);
}
private void fixNewLineCount(String str) {
for (int i = 0; i < str.length(); i++) {
if (str.charAt(i) == '\r') {
newLineCount++;
}
}
}
private void appendIndent() {
for (int i = 0; i < indent; i++) {
appendNoHilight(formatting.indentString);