Skip to content

Commit

Permalink
Avoid processCursorDown overflow on Y axis
Browse files Browse the repository at this point in the history
This fix issue gradle/gradle#882.
  • Loading branch information
lacasseio committed Jan 12, 2017
1 parent eeda18c commit 38a24fa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ protected void processCursorRight(int count) throws IOException {
@Override
protected void processCursorDown(int count) throws IOException {
getConsoleInfo();
info.cursorPosition.y = (short) Math.min(info.size.y, info.cursorPosition.y + count);
info.cursorPosition.y = (short) Math.min(Math.max(0, info.size.y - 1), info.cursorPosition.y + count);
applyCursorPosition();
}

Expand Down

0 comments on commit 38a24fa

Please sign in to comment.