Mercurial > vim
changeset 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 | 0c9c706da69a |
children | 24ab1eb625e1 |
files | src/os_win32.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os_win32.c +++ b/src/os_win32.c @@ -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; } }