comparison src/os_win32.c @ 14619:5e85d326d616 v8.1.0323

patch 8.1.0323: reverse order of VTP calls only needed the first time commit https://github.com/vim/vim/commit/2551c037e41b3c2702d3ec30ee518c11966b19e6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 23 22:38:31 2018 +0200 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 https://github.com/vim/vim/issues/3366)
author Christian Brabandt <cb@256bit.org>
date Thu, 23 Aug 2018 22:45:05 +0200
parents 7267c0d910fe
children 99e45fab9d17
comparison
equal deleted inserted replaced
14618:0c9c706da69a 14619:5e85d326d616
4044 int ySize) 4044 int ySize)
4045 { 4045 {
4046 CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */ 4046 CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */
4047 SMALL_RECT srWindowRect; /* hold the new console size */ 4047 SMALL_RECT srWindowRect; /* hold the new console size */
4048 COORD coordScreen; 4048 COORD coordScreen;
4049 static int resized = FALSE;
4049 4050
4050 #ifdef MCH_WRITE_DUMP 4051 #ifdef MCH_WRITE_DUMP
4051 if (fdDump) 4052 if (fdDump)
4052 { 4053 {
4053 fprintf(fdDump, "ResizeConBufAndWindow(%d, %d)\n", xSize, ySize); 4054 fprintf(fdDump, "ResizeConBufAndWindow(%d, %d)\n", xSize, ySize);
4089 4090
4090 // define the new console buffer size 4091 // define the new console buffer size
4091 coordScreen.X = xSize; 4092 coordScreen.X = xSize;
4092 coordScreen.Y = ySize; 4093 coordScreen.Y = ySize;
4093 4094
4094 // In the new console call API in reverse order 4095 // In the new console call API, only the first time in reverse order
4095 if (!vtp_working) 4096 if (!vtp_working || resized)
4096 { 4097 {
4097 ResizeWindow(hConsole, srWindowRect); 4098 ResizeWindow(hConsole, srWindowRect);
4098 ResizeConBuf(hConsole, coordScreen); 4099 ResizeConBuf(hConsole, coordScreen);
4099 } 4100 }
4100 else 4101 else
4101 { 4102 {
4102 ResizeConBuf(hConsole, coordScreen); 4103 ResizeConBuf(hConsole, coordScreen);
4103 ResizeWindow(hConsole, srWindowRect); 4104 ResizeWindow(hConsole, srWindowRect);
4105 resized = TRUE;
4104 } 4106 }
4105 } 4107 }
4106 4108
4107 4109
4108 /* 4110 /*