To: vim_dev@googlegroups.com Subject: Patch 8.2.1232 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1232 Problem: MS-Windows GUI: Snap cancelled by split command. Solution: Do not cancel Snap when splitting a window. (Ken Takata, closes #6467) Files: src/gui_w32.c *** ../vim-8.2.1231/src/gui_w32.c 2020-07-17 22:16:58.390212926 +0200 --- src/gui_w32.c 2020-07-17 22:23:20.833324151 +0200 *************** *** 3342,3360 **** /* * Return TRUE if the GUI window is maximized, filling the whole screen. */ int gui_mch_maximized(void) { WINDOWPLACEMENT wp; wp.length = sizeof(WINDOWPLACEMENT); if (GetWindowPlacement(s_hwnd, &wp)) ! return wp.showCmd == SW_SHOWMAXIMIZED || (wp.showCmd == SW_SHOWMINIMIZED ! && wp.flags == WPF_RESTORETOMAXIMIZED); ! return 0; } /* --- 3342,3374 ---- /* * Return TRUE if the GUI window is maximized, filling the whole screen. + * Also return TRUE if the window is snapped. */ int gui_mch_maximized(void) { WINDOWPLACEMENT wp; + RECT rc; wp.length = sizeof(WINDOWPLACEMENT); if (GetWindowPlacement(s_hwnd, &wp)) ! { ! if (wp.showCmd == SW_SHOWMAXIMIZED || (wp.showCmd == SW_SHOWMINIMIZED ! && wp.flags == WPF_RESTORETOMAXIMIZED)) ! return TRUE; ! if (wp.showCmd == SW_SHOWMINIMIZED) ! return FALSE; ! // Assume the window is snapped when the sizes from two APIs differ. ! GetWindowRect(s_hwnd, &rc); ! if ((rc.right - rc.left != ! wp.rcNormalPosition.right - wp.rcNormalPosition.left) ! || (rc.bottom - rc.top != ! wp.rcNormalPosition.bottom - wp.rcNormalPosition.top)) ! return TRUE; ! } ! return FALSE; } /* *** ../vim-8.2.1231/src/version.c 2020-07-17 22:16:58.390212926 +0200 --- src/version.c 2020-07-17 22:25:13.325054220 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1232, /**/ -- To define recursion, we must first define recursion. /// Bram Moolenaar -- Bram@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 ///