Blame SOURCES/7.4.442

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