File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
java/src/processing/mode/java Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 3939import processing .app .Sketch ;
4040import processing .app .SketchCode ;
4141import processing .app .Util ;
42+ import processing .core .PApplet ;
4243import processing .mode .java .pdex .LineMarker ;
4344import processing .mode .java .pdex .Problem ;
4445import processing .app .Language ;
@@ -207,12 +208,15 @@ private void recalculateMarkerPositions() {
207208 e .printStackTrace ();
208209 totalLines = 1 ; // do not divide by zero
209210 }
211+ int visibleLines = editor .getTextArea ().getVisibleLines ();
212+ totalLines = PApplet .max (totalLines , visibleLines );
210213
211214 for (LineMarker m : errorPoints ) {
212215 // Ratio of error line to total lines
213216 float y = (m .getLineNumber () + 1 ) / ((float ) totalLines );
214217 // Ratio multiplied by height of the error bar
215- y *= getHeight () - 15 ; // -15 is just a vertical offset
218+ y *= getHeight ();
219+ y -= 15 ; // -15 is just a vertical offset
216220
217221 m .setY ((int ) y );
218222 }
You can’t perform that action at this time.
0 commit comments