mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1695: Windows 10: crash when cursor is at bottom of terminal
Problem: Windows 10: crash when cursor is at bottom of terminal. Solution: Position the cursor before resizing. (Yasuhiro Matsumoto, closes #4679)
This commit is contained in:
parent
41a8260445
commit
f49a692259
@ -3738,6 +3738,7 @@ ResizeConBufAndWindow(
|
|||||||
CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */
|
CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */
|
||||||
SMALL_RECT srWindowRect; /* hold the new console size */
|
SMALL_RECT srWindowRect; /* hold the new console size */
|
||||||
COORD coordScreen;
|
COORD coordScreen;
|
||||||
|
COORD cursor;
|
||||||
static int resized = FALSE;
|
static int resized = FALSE;
|
||||||
|
|
||||||
#ifdef MCH_WRITE_DUMP
|
#ifdef MCH_WRITE_DUMP
|
||||||
@ -3792,6 +3793,11 @@ ResizeConBufAndWindow(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Workaround for a Windows 10 bug
|
||||||
|
cursor.X = srWindowRect.Left;
|
||||||
|
cursor.Y = srWindowRect.Top;
|
||||||
|
SetConsoleCursorPosition(hConsole, cursor);
|
||||||
|
|
||||||
ResizeConBuf(hConsole, coordScreen);
|
ResizeConBuf(hConsole, coordScreen);
|
||||||
ResizeWindow(hConsole, srWindowRect);
|
ResizeWindow(hConsole, srWindowRect);
|
||||||
resized = TRUE;
|
resized = TRUE;
|
||||||
|
@ -777,6 +777,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1695,
|
||||||
/**/
|
/**/
|
||||||
1694,
|
1694,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user