mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
Merge pull request #2991 from Akarshit/bugFix-PgDnException
Fix for Exception when pressing PgDn in a code without scrollbar #2990
This commit is contained in:
@@ -865,9 +865,10 @@ public abstract class InputHandler extends KeyAdapter
|
||||
int line = textArea.getCaretLine();
|
||||
|
||||
firstLine += visibleLines;
|
||||
|
||||
if(firstLine + visibleLines >= lineCount - 1)
|
||||
firstLine = lineCount - visibleLines;
|
||||
if (firstLine >= lineCount )
|
||||
firstLine -= visibleLines;
|
||||
else if(firstLine + visibleLines >= lineCount - 1)
|
||||
firstLine = lineCount - visibleLines;
|
||||
|
||||
textArea.setFirstLine(firstLine);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user