зеркало из https://github.com/github/ruby.git
win32.c: cursor relative to screen
* win32/win32.c (constat_apply): move relative to visible screen, not the entire buffer. [ruby-core:81883] [Bug #13707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7ac29740a1
Коммит
2c4d43082c
|
@ -6737,9 +6737,11 @@ constat_apply(HANDLE handle, struct constat *s, WCHAR w)
|
|||
break;
|
||||
case L'H':
|
||||
case L'f':
|
||||
pos.Y = (arg1 > csbi.dwSize.Y ? csbi.dwSize.Y : arg1) - 1;
|
||||
pos.Y = arg1 + csbi.srWindow.Top - 1;
|
||||
if (pos.Y > csbi.srWindow.Bottom) pos.Y = csbi.srWindow.Bottom;
|
||||
if (count < 2 || (arg1 = seq[1]) <= 0) arg1 = 1;
|
||||
pos.X = (arg1 > csbi.dwSize.X ? csbi.dwSize.X : arg1) - 1;
|
||||
pos.X = arg1 + csbi.srWindow.Left - 1;
|
||||
if (pos.X > csbi.srWindow.Right) pos.X = csbi.srWindow.Right;
|
||||
SetConsoleCursorPosition(handle, pos);
|
||||
break;
|
||||
case L'J':
|
||||
|
|
Загрузка…
Ссылка в новой задаче