Fixed EDT placement.

This commit is contained in:
Sam Pottinger
2023-08-20 15:03:27 -07:00
parent f2646c44c3
commit eb03bca69b
2 changed files with 1 additions and 4 deletions

View File

@@ -1030,11 +1030,9 @@ public abstract class Editor extends JFrame implements RunnerListener {
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;
}

View File

@@ -112,8 +112,7 @@ class PdeAdapter {
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);
}