Patch 8.1.2424

14 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 11, 2019, 4:58:25 PM12/11/19
to vim...@googlegroups.com

Patch 8.1.2424
Problem: MS-Windows: console buffer is resized unnecessarily.
Solution: Only call ResizeConBuf() when the size differs. (Nobuhiro
Takasaki, closes #5343)
Files: src/os_win32.c


*** ../vim-8.1.2423/src/os_win32.c 2019-12-05 20:28:43.356760445 +0100
--- src/os_win32.c 2019-12-11 22:56:40.108506213 +0100
***************
*** 1641,1655 ****
{
COORD dwSize = ir.Event.WindowBufferSizeEvent.dwSize;

! // Only call shell_resized() when the size actually change to
// avoid the screen is cleared.
if (dwSize.X != Columns || dwSize.Y != Rows)
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
GetConsoleScreenBufferInfo(g_hConOut, &csbi);
dwSize.Y = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
! ResizeConBuf(g_hConOut, dwSize);
! shell_resized();
}
}
else if (ir.EventType == MOUSE_EVENT
--- 1641,1659 ----
{
COORD dwSize = ir.Event.WindowBufferSizeEvent.dwSize;

! // Only call shell_resized() when the size actually changed to
// avoid the screen is cleared.
if (dwSize.X != Columns || dwSize.Y != Rows)
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
GetConsoleScreenBufferInfo(g_hConOut, &csbi);
+ dwSize.X = csbi.srWindow.Right - csbi.srWindow.Left + 1;
dwSize.Y = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
! if (dwSize.X != Columns || dwSize.Y != Rows)
! {
! ResizeConBuf(g_hConOut, dwSize);
! shell_resized();
! }
}
}
else if (ir.EventType == MOUSE_EVENT
*** ../vim-8.1.2423/src/version.c 2019-12-11 22:41:26.115764932 +0100
--- src/version.c 2019-12-11 22:53:53.073116432 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 2424,
/**/

--
Did you hear about the new 3 million dollar West Virginia State Lottery?
The winner gets 3 dollars a year for a million years.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages