Skip to content

Commit

Permalink
On windows, absolute cursor positioning is relative to the full buffe…
Browse files Browse the repository at this point in the history
…r, not the displayed window
  • Loading branch information
gnodet committed Jan 8, 2018
1 parent c03a3ba commit 3acf3d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ protected void processCursorUp(int count) throws IOException {
@Override
protected void processCursorTo(int row, int col) throws IOException {
getConsoleInfo();
info.cursorPosition.y = (short) (row - 1);
info.cursorPosition.y = (short) (info.window.top + row - 1);
info.cursorPosition.x = (short) (col - 1);
applyCursorPosition();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ protected void processCursorUp(int count) throws IOException {

protected void processCursorTo(int row, int col) throws IOException {
getConsoleInfo();
info.dwCursorPosition.Y = (short) (row - 1);
info.dwCursorPosition.Y = (short) (info.srWindow.Top + row - 1);
info.dwCursorPosition.X = (short) (col - 1);
applyCursorPosition();
}
Expand Down

0 comments on commit 3acf3d2

Please sign in to comment.