Using the Y viewport for setting cursor correctly (#368)

[shellhost] - fix cursor position, Y viewport.
This commit is contained in:
bugale 2019-12-13 00:32:17 +02:00 committed by bagajjal
parent 1b9b599f60
commit 17c9c6dbb3
1 changed files with 1 additions and 1 deletions

View File

@ -591,7 +591,7 @@ SendSetCursor(HANDLE hInput, int X, int Y)
int out = 0;
char formatted_output[255];
out = _snprintf_s(formatted_output, sizeof(formatted_output), _TRUNCATE, "\033[%d;%dH", Y, X);
out = _snprintf_s(formatted_output, sizeof(formatted_output), _TRUNCATE, "\033[%d;%dH", Y - ViewPortY, X);
if (out > 0 && bUseAnsiEmulation)
WriteFile(hInput, formatted_output, out, &wr, NULL);
}