d172a1a
To: vim-dev@vim.org
d172a1a
Subject: Patch 7.2.065
d172a1a
Fcc: outbox
d172a1a
From: Bram Moolenaar <Bram@moolenaar.net>
d172a1a
Mime-Version: 1.0
d172a1a
Content-Type: text/plain; charset=ISO-8859-1
d172a1a
Content-Transfer-Encoding: 8bit
d172a1a
------------
d172a1a
d172a1a
Patch 7.2.065
d172a1a
Problem:    GTK GUI: the cursor disappears when doing ":vsp" and the Vim
d172a1a
	    window is maximized.  (Dominique Pelle, Denis Smolyar)
d172a1a
Solution:   Don't change "Columns" back to an old value at a wrong moment.
d172a1a
	    Do change "Rows" when it should not be a problem.
d172a1a
Files:	    src/gui.c
d172a1a
d172a1a
d172a1a
*** ../vim-7.2.064/src/gui.c	Fri Nov 28 21:26:50 2008
d172a1a
--- src/gui.c	Wed Dec  3 18:01:21 2008
d172a1a
***************
d172a1a
*** 3241,3247 ****
d172a1a
  	    i = Rows;
d172a1a
  	    gui_update_tabline();
d172a1a
  	    Rows = i;
d172a1a
! 	    need_set_size = RESIZE_VERT;
d172a1a
  	    if (using_tabline)
d172a1a
  		fix_size = TRUE;
d172a1a
  	    if (!gui_use_tabline())
d172a1a
--- 3241,3247 ----
d172a1a
  	    i = Rows;
d172a1a
  	    gui_update_tabline();
d172a1a
  	    Rows = i;
d172a1a
! 	    need_set_size |= RESIZE_VERT;
d172a1a
  	    if (using_tabline)
d172a1a
  		fix_size = TRUE;
d172a1a
  	    if (!gui_use_tabline())
d172a1a
***************
d172a1a
*** 3275,3283 ****
d172a1a
  		if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
d172a1a
  		{
d172a1a
  		    if (i == SBAR_BOTTOM)
d172a1a
! 			need_set_size = RESIZE_VERT;
d172a1a
  		    else
d172a1a
! 			need_set_size = RESIZE_HOR;
d172a1a
  		    if (gui.which_scrollbars[i])
d172a1a
  			fix_size = TRUE;
d172a1a
  		}
d172a1a
--- 3275,3283 ----
d172a1a
  		if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
d172a1a
  		{
d172a1a
  		    if (i == SBAR_BOTTOM)
d172a1a
! 			need_set_size |= RESIZE_VERT;
d172a1a
  		    else
d172a1a
! 			need_set_size |= RESIZE_HOR;
d172a1a
  		    if (gui.which_scrollbars[i])
d172a1a
  			fix_size = TRUE;
d172a1a
  		}
d172a1a
***************
d172a1a
*** 3297,3303 ****
d172a1a
  	    gui_mch_enable_menu(gui.menu_is_active);
d172a1a
  	    Rows = i;
d172a1a
  	    prev_menu_is_active = gui.menu_is_active;
d172a1a
! 	    need_set_size = RESIZE_VERT;
d172a1a
  	    if (gui.menu_is_active)
d172a1a
  		fix_size = TRUE;
d172a1a
  	}
d172a1a
--- 3297,3303 ----
d172a1a
  	    gui_mch_enable_menu(gui.menu_is_active);
d172a1a
  	    Rows = i;
d172a1a
  	    prev_menu_is_active = gui.menu_is_active;
d172a1a
! 	    need_set_size |= RESIZE_VERT;
d172a1a
  	    if (gui.menu_is_active)
d172a1a
  		fix_size = TRUE;
d172a1a
  	}
d172a1a
***************
d172a1a
*** 3308,3314 ****
d172a1a
  	{
d172a1a
  	    gui_mch_show_toolbar(using_toolbar);
d172a1a
  	    prev_toolbar = using_toolbar;
d172a1a
! 	    need_set_size = RESIZE_VERT;
d172a1a
  	    if (using_toolbar)
d172a1a
  		fix_size = TRUE;
d172a1a
  	}
d172a1a
--- 3308,3314 ----
d172a1a
  	{
d172a1a
  	    gui_mch_show_toolbar(using_toolbar);
d172a1a
  	    prev_toolbar = using_toolbar;
d172a1a
! 	    need_set_size |= RESIZE_VERT;
d172a1a
  	    if (using_toolbar)
d172a1a
  		fix_size = TRUE;
d172a1a
  	}
d172a1a
***************
d172a1a
*** 3318,3324 ****
d172a1a
  	{
d172a1a
  	    gui_mch_enable_footer(using_footer);
d172a1a
  	    prev_footer = using_footer;
d172a1a
! 	    need_set_size = RESIZE_VERT;
d172a1a
  	    if (using_footer)
d172a1a
  		fix_size = TRUE;
d172a1a
  	}
d172a1a
--- 3318,3324 ----
d172a1a
  	{
d172a1a
  	    gui_mch_enable_footer(using_footer);
d172a1a
  	    prev_footer = using_footer;
d172a1a
! 	    need_set_size |= RESIZE_VERT;
d172a1a
  	    if (using_footer)
d172a1a
  		fix_size = TRUE;
d172a1a
  	}
d172a1a
***************
d172a1a
*** 3330,3339 ****
d172a1a
  	    prev_tearoff = using_tearoff;
d172a1a
  	}
d172a1a
  #endif
d172a1a
! 	if (need_set_size)
d172a1a
  	{
d172a1a
  #ifdef FEAT_GUI_GTK
d172a1a
! 	    long    c = Columns;
d172a1a
  #endif
d172a1a
  	    /* Adjust the size of the window to make the text area keep the
d172a1a
  	     * same size and to avoid that part of our window is off-screen
d172a1a
--- 3330,3340 ----
d172a1a
  	    prev_tearoff = using_tearoff;
d172a1a
  	}
d172a1a
  #endif
d172a1a
! 	if (need_set_size != 0)
d172a1a
  	{
d172a1a
  #ifdef FEAT_GUI_GTK
d172a1a
! 	    long    prev_Columns = Columns;
d172a1a
! 	    long    prev_Rows = Rows;
d172a1a
  #endif
d172a1a
  	    /* Adjust the size of the window to make the text area keep the
d172a1a
  	     * same size and to avoid that part of our window is off-screen
d172a1a
***************
d172a1a
*** 3349,3359 ****
d172a1a
  	     * If you remove this, please test this command for resizing
d172a1a
  	     * effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q".
d172a1a
  	     * Don't do this while starting up though.
d172a1a
! 	     * And don't change Rows, it may have be reduced intentionally
d172a1a
! 	     * when adding menu/toolbar/tabline. */
d172a1a
! 	    if (!gui.starting)
d172a1a
  		(void)char_avail();
d172a1a
! 	    Columns = c;
d172a1a
  #endif
d172a1a
  	}
d172a1a
  #ifdef FEAT_WINDOWS
d172a1a
--- 3350,3363 ----
d172a1a
  	     * If you remove this, please test this command for resizing
d172a1a
  	     * effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q".
d172a1a
  	     * Don't do this while starting up though.
d172a1a
! 	     * Don't change Rows when adding menu/toolbar/tabline.
d172a1a
! 	     * Don't change Columns when adding vertical toolbar. */
d172a1a
! 	    if (!gui.starting && need_set_size != (RESIZE_VERT | RESIZE_HOR))
d172a1a
  		(void)char_avail();
d172a1a
! 	    if ((need_set_size & RESIZE_VERT) == 0)
d172a1a
! 		Rows = prev_Rows;
d172a1a
! 	    if ((need_set_size & RESIZE_HOR) == 0)
d172a1a
! 		Columns = prev_Columns;
d172a1a
  #endif
d172a1a
  	}
d172a1a
  #ifdef FEAT_WINDOWS
d172a1a
*** ../vim-7.2.064/src/version.c	Wed Dec  3 13:38:00 2008
d172a1a
--- src/version.c	Wed Dec  3 18:47:11 2008
d172a1a
***************
d172a1a
*** 678,679 ****
d172a1a
--- 678,681 ----
d172a1a
  {   /* Add new patch number below this line */
d172a1a
+ /**/
d172a1a
+     65,
d172a1a
  /**/
d172a1a
d172a1a
-- 
d172a1a
Seen on the back of a biker's vest: If you can read this, my wife fell off.
d172a1a
d172a1a
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
d172a1a
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
d172a1a
\\\        download, build and distribute -- http://www.A-A-P.org        ///
d172a1a
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///