Skip to content

Commit 3218390

Browse files
committed
fix placement of highlighted error line (processing#3654)
1 parent b4475ac commit 3218390

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

java/src/processing/mode/java/JavaBuild.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,14 @@ public String preprocess(File srcFolder,
263263
if (sizeInfo != null && sizeInfo.hasSettings()) {
264264
// String sizeStatement = sizeInfo.getStatement();
265265
for (String stmt : sizeInfo.getStatements()) {
266-
// if (sizeStatement != null) {
267266
//System.out.format("size stmt is '%s'%n", sizeStatement);
267+
// Don't remove newlines (and while you're at it, just keep spaces)
268+
// https://github.com/processing/processing/issues/3654
269+
stmt = stmt.trim();
268270
int index = bigCode.indexOf(stmt);
269271
if (index != -1) {
270272
bigCode.delete(index, index + stmt.length());
273+
System.out.println("code now " + bigCode);
271274
} else {
272275
// TODO remove once we hit final; but prevent an exception like in
273276
// https://github.com/processing/processing/issues/3531

todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
X processing-java isn't working in OS X 10.11 El Capitan
33
X https://github.com/processing/processing/issues/3497
44
o probably have to add the script/Processing.app location to user's path
5+
X line selected for errors is off by one or two
6+
X https://github.com/processing/processing/issues/3654
57

68
contribs
79
X Undo does not move to the correct location in the editor window

0 commit comments

Comments
 (0)