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