Skip to content

Commit

Permalink
Fixed EDT placement.
Browse files Browse the repository at this point in the history
  • Loading branch information
sampottinger committed Aug 20, 2023
1 parent f2646c4 commit eb03bca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions app/src/processing/app/ui/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 1 addition & 2 deletions java/src/processing/mode/java/lsp/PdeAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit eb03bca

Please sign in to comment.