1
0
forked from aniani/vim

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:
Bram Moolenaar
2018-08-23 22:38:31 +02:00
parent 7cb33a14c9
commit 2551c037e4
2 changed files with 6 additions and 2 deletions

View File

@@ -4046,6 +4046,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;
static int resized = FALSE;
#ifdef MCH_WRITE_DUMP #ifdef MCH_WRITE_DUMP
if (fdDump) if (fdDump)
@@ -4091,8 +4092,8 @@ ResizeConBufAndWindow(
coordScreen.X = xSize; coordScreen.X = xSize;
coordScreen.Y = ySize; coordScreen.Y = ySize;
// In the new console call API in reverse order // In the new console call API, only the first time in reverse order
if (!vtp_working) if (!vtp_working || resized)
{ {
ResizeWindow(hConsole, srWindowRect); ResizeWindow(hConsole, srWindowRect);
ResizeConBuf(hConsole, coordScreen); ResizeConBuf(hConsole, coordScreen);
@@ -4101,6 +4102,7 @@ ResizeConBufAndWindow(
{ {
ResizeConBuf(hConsole, coordScreen); ResizeConBuf(hConsole, coordScreen);
ResizeWindow(hConsole, srWindowRect); ResizeWindow(hConsole, srWindowRect);
resized = TRUE;
} }
} }

View File

@@ -794,6 +794,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 */
/**/
323,
/**/ /**/
322, 322,
/**/ /**/