To: vim-dev@vim.org Subject: Patch 7.0.170 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.0.170 (extra) Problem: Win32: Using "gvim --remote-tab foo" when gvim is minimized while it previously was maximized, un-maximizing doesn't work properly. And the labels are not displayed properly when 'encoding' is utf-8. Solution: When minimized check for SW_SHOWMINIMIZED. When updating the tab pages line use TCM_SETITEMW instead of TCM_INSERTITEMW. (Liu Yubao) Files: src/gui_w48.c *** ../vim-7.0.169/src/gui_w48.c Tue Nov 7 19:05:36 2006 --- src/gui_w48.c Mon Nov 27 22:26:15 2006 *************** *** 2405,2412 **** tiw.mask = TCIF_TEXT; tiw.iImage = -1; tiw.pszText = wstr; ! SendMessage(s_tabhwnd, TCM_INSERTITEMW, (WPARAM)nr, ! (LPARAM)&tiw); vim_free(wstr); } } --- 2405,2411 ---- tiw.mask = TCIF_TEXT; tiw.iImage = -1; tiw.pszText = wstr; ! SendMessage(s_tabhwnd, TCM_SETITEMW, (WPARAM)nr, (LPARAM)&tiw); vim_free(wstr); } } *************** *** 3033,3045 **** return OK; } /* * Return TRUE if the GUI window is maximized, filling the whole screen. */ int gui_mch_maximized() { ! return IsZoomed(s_hwnd); } /* --- 3032,3056 ---- return OK; } + #ifndef WPF_RESTORETOMAXIMIZED + # define WPF_RESTORETOMAXIMIZED 2 /* just in case someone doesn't have it */ + #endif + /* * Return TRUE if the GUI window is maximized, filling the whole screen. */ int gui_mch_maximized() { ! 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; } /* *** ../vim-7.0.169/src/version.c Tue Nov 28 16:16:03 2006 --- src/version.c Tue Nov 28 17:16:07 2006 *************** *** 668,669 **** --- 668,671 ---- { /* Add new patch number below this line */ + /**/ + 170, /**/ -- Veni, Vidi, Video -- I came, I saw, I taped what I saw. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///