Karsten Hopp e4053b
To: vim_dev@googlegroups.com
Karsten Hopp e4053b
Subject: Patch 7.4.681
Karsten Hopp e4053b
Fcc: outbox
Karsten Hopp e4053b
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp e4053b
Mime-Version: 1.0
Karsten Hopp e4053b
Content-Type: text/plain; charset=UTF-8
Karsten Hopp e4053b
Content-Transfer-Encoding: 8bit
Karsten Hopp e4053b
------------
Karsten Hopp e4053b
Karsten Hopp e4053b
Patch 7.4.681
Karsten Hopp e4053b
Problem:    MS-Windows: When Vim is minimized the window height is computed
Karsten Hopp e4053b
	    incorrectly.
Karsten Hopp e4053b
Solution:   When minimized use the previously computed size. (Ingo Karkat)
Karsten Hopp e4053b
Files:	    src/gui_w32.c
Karsten Hopp e4053b
Karsten Hopp e4053b
Karsten Hopp e4053b
*** ../vim-7.4.680/src/gui_w32.c	2014-11-12 16:10:44.258085148 +0100
Karsten Hopp e4053b
--- src/gui_w32.c	2015-03-24 17:56:24.915296832 +0100
Karsten Hopp e4053b
***************
Karsten Hopp e4053b
*** 598,603 ****
Karsten Hopp e4053b
--- 598,611 ----
Karsten Hopp e4053b
  
Karsten Hopp e4053b
      if (num == 0)
Karsten Hopp e4053b
  	menu_height = 0;
Karsten Hopp e4053b
+     else if (IsMinimized(s_hwnd))
Karsten Hopp e4053b
+     {
Karsten Hopp e4053b
+ 	/* The height of the menu cannot be determined while the window is
Karsten Hopp e4053b
+ 	 * minimized.  Take the previous height if the menu is changed in that
Karsten Hopp e4053b
+ 	 * state, to avoid that Vim's vertical window size accidentally
Karsten Hopp e4053b
+ 	 * increases due to the unaccounted-for menu height. */
Karsten Hopp e4053b
+ 	menu_height = old_menu_height == -1 ? 0 : old_menu_height;
Karsten Hopp e4053b
+     }
Karsten Hopp e4053b
      else
Karsten Hopp e4053b
      {
Karsten Hopp e4053b
  	if (is_winnt_3())	/* for NT 3.xx */
Karsten Hopp e4053b
***************
Karsten Hopp e4053b
*** 644,652 ****
Karsten Hopp e4053b
  
Karsten Hopp e4053b
      if (fix_window && menu_height != old_menu_height)
Karsten Hopp e4053b
      {
Karsten Hopp e4053b
- 	old_menu_height = menu_height;
Karsten Hopp e4053b
  	gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
Karsten Hopp e4053b
      }
Karsten Hopp e4053b
  
Karsten Hopp e4053b
      return menu_height;
Karsten Hopp e4053b
  }
Karsten Hopp e4053b
--- 652,660 ----
Karsten Hopp e4053b
  
Karsten Hopp e4053b
      if (fix_window && menu_height != old_menu_height)
Karsten Hopp e4053b
      {
Karsten Hopp e4053b
  	gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
Karsten Hopp e4053b
      }
Karsten Hopp e4053b
+     old_menu_height = menu_height;
Karsten Hopp e4053b
  
Karsten Hopp e4053b
      return menu_height;
Karsten Hopp e4053b
  }
Karsten Hopp e4053b
*** ../vim-7.4.680/src/version.c	2015-03-24 17:49:39.611748618 +0100
Karsten Hopp e4053b
--- src/version.c	2015-03-24 17:54:39.584448182 +0100
Karsten Hopp e4053b
***************
Karsten Hopp e4053b
*** 743,744 ****
Karsten Hopp e4053b
--- 743,746 ----
Karsten Hopp e4053b
  {   /* Add new patch number below this line */
Karsten Hopp e4053b
+ /**/
Karsten Hopp e4053b
+     681,
Karsten Hopp e4053b
  /**/
Karsten Hopp e4053b
Karsten Hopp e4053b
-- 
Karsten Hopp e4053b
TALL KNIGHT:   Firstly.  You must get us another shrubbery!
Karsten Hopp e4053b
OTHER KNIGHTS: More shrubberies!  More shrubberies for the ex-Knights of Ni!
Karsten Hopp e4053b
ARTHUR:        Not another shrubbery -
Karsten Hopp e4053b
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp e4053b
Karsten Hopp e4053b
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp e4053b
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp e4053b
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp e4053b
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///