From 0516e2d6196539e2eebdc60cd7a3bfdaf20bc691 Mon Sep 17 00:00:00 2001 From: bagajjal Date: Mon, 16 Mar 2020 23:27:57 +0000 Subject: [PATCH] Fix cursor scroll issue for downlevel OS (#430) --- contrib/win32/win32compat/shell-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/win32/win32compat/shell-host.c b/contrib/win32/win32compat/shell-host.c index d044a4dcd..d6b5ff0f1 100644 --- a/contrib/win32/win32compat/shell-host.c +++ b/contrib/win32/win32compat/shell-host.c @@ -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 - ViewPortY, X); + out = _snprintf_s(formatted_output, sizeof(formatted_output), _TRUNCATE, "\033[%d;%dH", Y, X); if (out > 0 && bUseAnsiEmulation) WriteFile(hInput, formatted_output, out, &wr, NULL); }