mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1232: MS-Windows GUI: Snap cancelled by split command
Problem: MS-Windows GUI: Snap cancelled by split command. Solution: Do not cancel Snap when splitting a window. (Ken Takata, closes #6467)
This commit is contained in:
parent
945c857844
commit
b68ced5f07
@ -3342,19 +3342,33 @@ gui_mch_init_font(char_u *font_name, int fontset UNUSED)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Return TRUE if the GUI window is maximized, filling the whole screen.
|
* Return TRUE if the GUI window is maximized, filling the whole screen.
|
||||||
|
* Also return TRUE if the window is snapped.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
gui_mch_maximized(void)
|
gui_mch_maximized(void)
|
||||||
{
|
{
|
||||||
WINDOWPLACEMENT wp;
|
WINDOWPLACEMENT wp;
|
||||||
|
RECT rc;
|
||||||
|
|
||||||
wp.length = sizeof(WINDOWPLACEMENT);
|
wp.length = sizeof(WINDOWPLACEMENT);
|
||||||
if (GetWindowPlacement(s_hwnd, &wp))
|
if (GetWindowPlacement(s_hwnd, &wp))
|
||||||
return wp.showCmd == SW_SHOWMAXIMIZED
|
{
|
||||||
|
if (wp.showCmd == SW_SHOWMAXIMIZED
|
||||||
|| (wp.showCmd == SW_SHOWMINIMIZED
|
|| (wp.showCmd == SW_SHOWMINIMIZED
|
||||||
&& wp.flags == WPF_RESTORETOMAXIMIZED);
|
&& wp.flags == WPF_RESTORETOMAXIMIZED))
|
||||||
|
return TRUE;
|
||||||
|
if (wp.showCmd == SW_SHOWMINIMIZED)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return 0;
|
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -754,6 +754,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 */
|
||||||
|
/**/
|
||||||
|
1232,
|
||||||
/**/
|
/**/
|
||||||
1231,
|
1231,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user