mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.0323: reverse order of VTP calls only needed the first time
Problem: Reverse order of VTP calls only needed the first time. Solution: Add a flag to remember the state. (Nobuhiro Takasaki, closes #3366)
This commit is contained in:
@@ -4046,6 +4046,7 @@ ResizeConBufAndWindow(
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */
|
||||
SMALL_RECT srWindowRect; /* hold the new console size */
|
||||
COORD coordScreen;
|
||||
static int resized = FALSE;
|
||||
|
||||
#ifdef MCH_WRITE_DUMP
|
||||
if (fdDump)
|
||||
@@ -4091,8 +4092,8 @@ ResizeConBufAndWindow(
|
||||
coordScreen.X = xSize;
|
||||
coordScreen.Y = ySize;
|
||||
|
||||
// In the new console call API in reverse order
|
||||
if (!vtp_working)
|
||||
// In the new console call API, only the first time in reverse order
|
||||
if (!vtp_working || resized)
|
||||
{
|
||||
ResizeWindow(hConsole, srWindowRect);
|
||||
ResizeConBuf(hConsole, coordScreen);
|
||||
@@ -4101,6 +4102,7 @@ ResizeConBufAndWindow(
|
||||
{
|
||||
ResizeConBuf(hConsole, coordScreen);
|
||||
ResizeWindow(hConsole, srWindowRect);
|
||||
resized = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user