Skip to content

Commit d366df9

Browse files
committed
Hold on fix for processing#752.
1 parent 36e1cbd commit d366df9

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/src/processing/app/syntax/PdeTextAreaPainter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static private void paintSquiggle(Graphics g, int y, int x1, int x2) {
326326
public String getToolTipText(MouseEvent event) {
327327
fontMetrics = getFontMetrics();
328328
int line = event.getY() / fontMetrics.getHeight() + textArea.getFirstLine();
329-
if (line >= 0 || line < textArea.getLineCount()) {
329+
if (line >= 0 || line < textArea.getLineCount()) {getPreprocessIssues
330330
List<Problem> problems = getEditor().findProblems(line);
331331
for (Problem problem : problems) {
332332
int lineStart = textArea.getLineStartOffset(line);
@@ -338,6 +338,8 @@ public String getToolTipText(MouseEvent event) {
338338
int startOffset = Math.max(errorStart, lineStart) - lineStart;
339339
int stopOffset = Math.min(errorEnd, lineEnd) - lineStart;
340340

341+
System.out.println(lineStart + "\t" + lineEnd + "\t" + errorStart + "\t" + errorEnd + "\t" + startOffset + "\t" + stopOffset);
342+
341343
int x = event.getX();
342344

343345
if (x >= textArea.offsetToX(line, startOffset) &&

java/src/processing/mode/java/ProblemFactory.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ public static Problem build(PdePreprocessIssue pdePreprocessIssue, List<Integer>
5252
tab,
5353
localLine,
5454
message,
55-
lineStart,
56-
lineStop,
57-
false
55+
0,
56+
lineStop - lineStart
5857
);
5958
}
6059

@@ -85,8 +84,7 @@ public static Problem build(PdePreprocessIssue pdePreprocessIssue, List<Integer>
8584
localLine,
8685
message,
8786
0,
88-
col,
89-
true
87+
col
9088
);
9189
}
9290

0 commit comments

Comments
 (0)