073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.442
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.442 (after 7.4.434)
073263
Problem:    Using unitinialized variable.
073263
Solution:   Pass the first window of the tabpage.
073263
Files:	    src/eval.c
073263
073263
073263
*** ../vim-7.4.441/src/eval.c	2014-09-09 16:13:05.040531695 +0200
073263
--- src/eval.c	2014-09-09 22:52:50.916584088 +0200
073263
***************
073263
*** 12071,12077 ****
073263
      typval_T	*argvars;
073263
      typval_T	*rettv;
073263
  {
073263
!     win_T	*win, *oldcurwin;
073263
      tabpage_T	*tp, *oldtabpage;
073263
      dictitem_T	*v;
073263
      char_u	*varname;
073263
--- 12071,12077 ----
073263
      typval_T	*argvars;
073263
      typval_T	*rettv;
073263
  {
073263
!     win_T	*oldcurwin;
073263
      tabpage_T	*tp, *oldtabpage;
073263
      dictitem_T	*v;
073263
      char_u	*varname;
073263
***************
073263
*** 12084,12092 ****
073263
      tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
073263
      if (tp != NULL && varname != NULL)
073263
      {
073263
! 	/* Set curwin to be our win, temporarily.  Also set the tabpage,
073263
! 	 * otherwise the window is not valid. */
073263
! 	switch_win(&oldcurwin, &oldtabpage, win, tp, TRUE);
073263
  
073263
  	/* look up the variable */
073263
  	/* Let gettabvar({nr}, "") return the "t:" dictionary. */
073263
--- 12084,12092 ----
073263
      tp = find_tabpage((int)get_tv_number_chk(&argvars[0], NULL));
073263
      if (tp != NULL && varname != NULL)
073263
      {
073263
! 	/* Set tp to be our tabpage, temporarily.  Also set the window to the
073263
! 	 * first window in the tabpage, otherwise the window is not valid. */
073263
! 	switch_win(&oldcurwin, &oldtabpage, tp->tp_firstwin, tp, TRUE);
073263
  
073263
  	/* look up the variable */
073263
  	/* Let gettabvar({nr}, "") return the "t:" dictionary. */
073263
*** ../vim-7.4.441/src/version.c	2014-09-09 18:45:45.888551705 +0200
073263
--- src/version.c	2014-09-09 23:10:27.544586396 +0200
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     442,
073263
  /**/
073263
073263
-- 
073263
Two percent of zero is almost nothing.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///