Skip to content

Commit

Permalink
Merge pull request #70 from lacasseio/gradle-issue-882
Browse files Browse the repository at this point in the history
Avoid `WindowsAnsiOutputStream.processCursorDown` overflow on Y axis
  • Loading branch information
gnodet committed Mar 15, 2017
2 parents 471902d + 38a24fa commit fd83740
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 fd83740

Please sign in to comment.