diff --git a/app/src/processing/app/ui/Editor.java b/app/src/processing/app/ui/Editor.java index 966099693..3babbb6df 100644 --- a/app/src/processing/app/ui/Editor.java +++ b/app/src/processing/app/ui/Editor.java @@ -1030,11 +1030,9 @@ static public void showChanges() { static public int getProblemEditorLineStop(Problem problem, int lineStart, int lineStop) { int stopOffset = problem.getStopOffset(); - System.out.println("> " + lineStart + " " + lineStop + " " + stopOffset); if (stopOffset == -1) { stopOffset = lineStop - lineStart; } - System.out.println("< " + lineStart + " " + lineStop + " " + stopOffset); return stopOffset; } diff --git a/java/src/processing/mode/java/lsp/PdeAdapter.java b/java/src/processing/mode/java/lsp/PdeAdapter.java index 65925e7a7..f4f1f450d 100644 --- a/java/src/processing/mode/java/lsp/PdeAdapter.java +++ b/java/src/processing/mode/java/lsp/PdeAdapter.java @@ -112,8 +112,7 @@ static Offset toLineCol(String s, int offset) { static Offset toLineEndCol(String s, int offset) { Offset before = toLineCol(s, offset); - int remaining = s.substring(offset).indexOf('\n'); - return new Offset(before.line, before.col + remaining); + return new Offset(before.line, Integer.MAX_VALUE); }