fix placement of highlighted error line (#3654)

This commit is contained in:
Ben Fry
2015-08-19 08:54:03 -04:00
parent 5852ff9c41
commit 116483b99b
2 changed files with 6 additions and 1 deletions

View File

@@ -263,11 +263,14 @@ public class JavaBuild {
if (sizeInfo != null && sizeInfo.hasSettings()) {
// String sizeStatement = sizeInfo.getStatement();
for (String stmt : sizeInfo.getStatements()) {
// if (sizeStatement != null) {
//System.out.format("size stmt is '%s'%n", sizeStatement);
// Don't remove newlines (and while you're at it, just keep spaces)
// https://github.com/processing/processing/issues/3654
stmt = stmt.trim();
int index = bigCode.indexOf(stmt);
if (index != -1) {
bigCode.delete(index, index + stmt.length());
System.out.println("code now " + bigCode);
} else {
// TODO remove once we hit final; but prevent an exception like in
// https://github.com/processing/processing/issues/3531