81c2858
To: vim-dev@vim.org
81c2858
Subject: Patch 7.2.149
81c2858
Fcc: outbox
81c2858
From: Bram Moolenaar <Bram@moolenaar.net>
81c2858
Mime-Version: 1.0
81c2858
Content-Type: text/plain; charset=ISO-8859-1
81c2858
Content-Transfer-Encoding: 8bit
81c2858
------------
81c2858
81c2858
Patch 7.2.149
81c2858
Problem:    Using return value of function that doesn't return a value results
81c2858
	    in reading uninitialized memory.
81c2858
Solution:   Set the default to return zero.  Make cursor() return -1 on
81c2858
	    failure.  Let complete() return an empty string in case of an
81c2858
	    error.  (partly by Dominique Pelle)
81c2858
Files:	    runtime/doc/eval.txt, src/eval.c
81c2858
81c2858
81c2858
*** ../vim-7.2.148/runtime/doc/eval.txt	Tue Dec  9 10:56:50 2008
81c2858
--- runtime/doc/eval.txt	Sun Mar 22 14:28:49 2009
81c2858
***************
81c2858
*** 2414,2419 ****
81c2858
--- 2419,2425 ----
81c2858
  		When 'virtualedit' is used {off} specifies the offset in
81c2858
  		screen columns from the start of the character.  E.g., a
81c2858
  		position within a <Tab> or after the last character.
81c2858
+ 		Returns 0 when the position could be set, -1 otherwise.
81c2858
  
81c2858
  
81c2858
  deepcopy({expr}[, {noref}])				*deepcopy()* *E698*
81c2858
***************
81c2858
*** 4516,4521 ****
81c2858
--- 4526,4532 ----
81c2858
  		should also work to move files across file systems.  The
81c2858
  		result is a Number, which is 0 if the file was renamed
81c2858
  		successfully, and non-zero when the renaming failed.
81c2858
+ 		NOTE: If {to} exists it is overwritten without warning.
81c2858
  		This function is not available in the |sandbox|.
81c2858
  
81c2858
  repeat({expr}, {count})					*repeat()*
81c2858
*** ../vim-7.2.148/src/eval.c	Wed Feb  4 16:25:53 2009
81c2858
--- src/eval.c	Sun Mar 22 20:45:18 2009
81c2858
***************
81c2858
*** 1285,1291 ****
81c2858
--- 1285,1293 ----
81c2858
      typval_T	tv;
81c2858
      char_u	*retval;
81c2858
      garray_T	ga;
81c2858
+ #ifdef FEAT_FLOAT
81c2858
      char_u	numbuf[NUMBUFLEN];
81c2858
+ #endif
81c2858
  
81c2858
      if (eval0(arg, &tv, nextcmd, TRUE) == FAIL)
81c2858
  	retval = NULL;
81c2858
***************
81c2858
*** 8018,8024 ****
81c2858
      /* execute the function if no errors detected and executing */
81c2858
      if (evaluate && error == ERROR_NONE)
81c2858
      {
81c2858
! 	rettv->v_type = VAR_NUMBER;	/* default is number rettv */
81c2858
  	error = ERROR_UNKNOWN;
81c2858
  
81c2858
  	if (!builtin_function(fname))
81c2858
--- 8020,8027 ----
81c2858
      /* execute the function if no errors detected and executing */
81c2858
      if (evaluate && error == ERROR_NONE)
81c2858
      {
81c2858
! 	rettv->v_type = VAR_NUMBER;	/* default rettv is number zero */
81c2858
! 	rettv->vval.v_number = 0;
81c2858
  	error = ERROR_UNKNOWN;
81c2858
  
81c2858
  	if (!builtin_function(fname))
81c2858
***************
81c2858
*** 8268,8274 ****
81c2858
  		return;
81c2858
  	    li = l->lv_first;
81c2858
  	}
81c2858
- 	rettv->vval.v_number = 0;	/* Default: Success */
81c2858
  	for (;;)
81c2858
  	{
81c2858
  	    if (l == NULL)
81c2858
--- 8271,8276 ----
81c2858
***************
81c2858
*** 8728,8734 ****
81c2858
      int		dummy;
81c2858
      dict_T	*selfdict = NULL;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[1].v_type != VAR_LIST)
81c2858
      {
81c2858
  	EMSG(_(e_listreq));
81c2858
--- 8730,8735 ----
81c2858
***************
81c2858
*** 9036,9048 ****
81c2858
      if (buttons == NULL || *buttons == NUL)
81c2858
  	buttons = (char_u *)_("&Ok");
81c2858
  
81c2858
!     if (error)
81c2858
! 	rettv->vval.v_number = 0;
81c2858
!     else
81c2858
  	rettv->vval.v_number = do_dialog(type, NULL, message, buttons,
81c2858
  								   def, NULL);
81c2858
- #else
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #endif
81c2858
  }
81c2858
  
81c2858
--- 9037,9045 ----
81c2858
      if (buttons == NULL || *buttons == NUL)
81c2858
  	buttons = (char_u *)_("&Ok");
81c2858
  
81c2858
!     if (!error)
81c2858
  	rettv->vval.v_number = do_dialog(type, NULL, message, buttons,
81c2858
  								   def, NULL);
81c2858
  #endif
81c2858
  }
81c2858
  
81c2858
***************
81c2858
*** 9181,9195 ****
81c2858
      }
81c2858
  
81c2858
      rettv->vval.v_number = cs_connection(num, dbpath, prepend);
81c2858
- #else
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #endif
81c2858
  }
81c2858
  
81c2858
  /*
81c2858
   * "cursor(lnum, col)" function
81c2858
   *
81c2858
!  * Moves the cursor to the specified line and column
81c2858
   */
81c2858
  /*ARGSUSED*/
81c2858
      static void
81c2858
--- 9178,9191 ----
81c2858
      }
81c2858
  
81c2858
      rettv->vval.v_number = cs_connection(num, dbpath, prepend);
81c2858
  #endif
81c2858
  }
81c2858
  
81c2858
  /*
81c2858
   * "cursor(lnum, col)" function
81c2858
   *
81c2858
!  * Moves the cursor to the specified line and column.
81c2858
!  * Returns 0 when the position could be set, -1 otherwise.
81c2858
   */
81c2858
  /*ARGSUSED*/
81c2858
      static void
81c2858
***************
81c2858
*** 9202,9207 ****
81c2858
--- 9198,9204 ----
81c2858
      long	coladd = 0;
81c2858
  #endif
81c2858
  
81c2858
+     rettv->vval.v_number = -1;
81c2858
      if (argvars[1].v_type == VAR_UNKNOWN)
81c2858
      {
81c2858
  	pos_T	    pos;
81c2858
***************
81c2858
*** 9246,9251 ****
81c2858
--- 9243,9249 ----
81c2858
  #endif
81c2858
  
81c2858
      curwin->w_set_curswant = TRUE;
81c2858
+     rettv->vval.v_number = 0;
81c2858
  }
81c2858
  
81c2858
  /*
81c2858
***************
81c2858
*** 9291,9298 ****
81c2858
  {
81c2858
  #ifdef FEAT_AUTOCMD
81c2858
      rettv->vval.v_number = did_filetype;
81c2858
- #else
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #endif
81c2858
  }
81c2858
  
81c2858
--- 9289,9294 ----
81c2858
***************
81c2858
*** 9605,9611 ****
81c2858
      typval_T	*argvars;
81c2858
      typval_T	*rettv;
81c2858
  {
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST)
81c2858
      {
81c2858
  	list_T		*l1, *l2;
81c2858
--- 9601,9606 ----
81c2858
***************
81c2858
*** 9733,9739 ****
81c2858
      if (check_secure())
81c2858
  	return;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      keys = get_tv_string(&argvars[0]);
81c2858
      if (*keys != NUL)
81c2858
      {
81c2858
--- 9728,9733 ----
81c2858
***************
81c2858
*** 9901,9907 ****
81c2858
      char_u	*ermsg = map ? (char_u *)"map()" : (char_u *)"filter()";
81c2858
      int		save_did_emsg;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type == VAR_LIST)
81c2858
      {
81c2858
  	if ((l = argvars[0].vval.v_list) == NULL
81c2858
--- 9895,9900 ----
81c2858
***************
81c2858
*** 10084,10091 ****
81c2858
  	else
81c2858
  	    rettv->vval.v_number = (varnumber_T)f;
81c2858
      }
81c2858
-     else
81c2858
- 	rettv->vval.v_number = 0;
81c2858
  }
81c2858
  
81c2858
  /*
81c2858
--- 10077,10082 ----
81c2858
***************
81c2858
*** 10219,10227 ****
81c2858
      lnum = get_tv_lnum(argvars);
81c2858
      if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
81c2858
  	rettv->vval.v_number = foldLevel(lnum);
81c2858
-     else
81c2858
  #endif
81c2858
- 	rettv->vval.v_number = 0;
81c2858
  }
81c2858
  
81c2858
  /*
81c2858
--- 10210,10216 ----
81c2858
***************
81c2858
*** 10337,10343 ****
81c2858
      typval_T	*argvars;
81c2858
      typval_T	*rettv;
81c2858
  {
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #ifdef FEAT_GUI
81c2858
      if (gui.in_use)
81c2858
  	gui_mch_set_foreground();
81c2858
--- 10326,10331 ----
81c2858
***************
81c2858
*** 10359,10365 ****
81c2858
  {
81c2858
      char_u	*s;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      s = get_tv_string(&argvars[0]);
81c2858
      if (s == NULL || *s == NUL || VIM_ISDIGIT(*s))
81c2858
  	EMSG2(_(e_invarg2), s);
81c2858
--- 10347,10352 ----
81c2858
***************
81c2858
*** 10429,10437 ****
81c2858
  
81c2858
      if (tv == NULL)
81c2858
      {
81c2858
! 	if (argvars[2].v_type == VAR_UNKNOWN)
81c2858
! 	    rettv->vval.v_number = 0;
81c2858
! 	else
81c2858
  	    copy_tv(&argvars[2], rettv);
81c2858
      }
81c2858
      else
81c2858
--- 10416,10422 ----
81c2858
  
81c2858
      if (tv == NULL)
81c2858
      {
81c2858
! 	if (argvars[2].v_type != VAR_UNKNOWN)
81c2858
  	    copy_tv(&argvars[2], rettv);
81c2858
      }
81c2858
      else
81c2858
***************
81c2858
*** 10456,10468 ****
81c2858
  {
81c2858
      char_u	*p;
81c2858
  
81c2858
!     if (retlist)
81c2858
!     {
81c2858
! 	if (rettv_list_alloc(rettv) == FAIL)
81c2858
! 	    return;
81c2858
!     }
81c2858
!     else
81c2858
! 	rettv->vval.v_number = 0;
81c2858
  
81c2858
      if (buf == NULL || buf->b_ml.ml_mfp == NULL || start < 0)
81c2858
  	return;
81c2858
--- 10441,10448 ----
81c2858
  {
81c2858
      char_u	*p;
81c2858
  
81c2858
!     if (retlist && rettv_list_alloc(rettv) == FAIL)
81c2858
! 	return;
81c2858
  
81c2858
      if (buf == NULL || buf->b_ml.ml_mfp == NULL || start < 0)
81c2858
  	return;
81c2858
***************
81c2858
*** 11009,11016 ****
81c2858
      dict_T	*dict;
81c2858
      matchitem_T	*cur = curwin->w_match_head;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
- 
81c2858
      if (rettv_list_alloc(rettv) == OK)
81c2858
      {
81c2858
  	while (cur != NULL)
81c2858
--- 10989,10994 ----
81c2858
***************
81c2858
*** 11089,11095 ****
81c2858
      win_T	*wp;
81c2858
  #endif
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #ifdef FEAT_QUICKFIX
81c2858
      if (rettv_list_alloc(rettv) == OK)
81c2858
      {
81c2858
--- 11067,11072 ----
81c2858
***************
81c2858
*** 11935,11941 ****
81c2858
      typval_T	*argvars;
81c2858
      typval_T	*rettv;
81c2858
  {
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type != VAR_DICT)
81c2858
      {
81c2858
  	EMSG(_(e_dictreq));
81c2858
--- 11912,11917 ----
81c2858
***************
81c2858
*** 12052,12059 ****
81c2858
  	n = del_history_entry(get_histtype(str),
81c2858
  				      get_tv_string_buf(&argvars[1], buf));
81c2858
      rettv->vval.v_number = n;
81c2858
- #else
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #endif
81c2858
  }
81c2858
  
81c2858
--- 12028,12033 ----
81c2858
***************
81c2858
*** 12415,12421 ****
81c2858
      int		selected;
81c2858
      int		mouse_used;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #ifdef NO_CONSOLE_INPUT
81c2858
      /* While starting up, there is no place to enter text. */
81c2858
      if (no_console_input())
81c2858
--- 12389,12394 ----
81c2858
***************
81c2858
*** 12464,12470 ****
81c2858
  	--ga_userinput.ga_len;
81c2858
  	restore_typeahead((tasave_T *)(ga_userinput.ga_data)
81c2858
  						       + ga_userinput.ga_len);
81c2858
! 	rettv->vval.v_number = 0; /* OK */
81c2858
      }
81c2858
      else if (p_verbose > 1)
81c2858
      {
81c2858
--- 12437,12443 ----
81c2858
  	--ga_userinput.ga_len;
81c2858
  	restore_typeahead((tasave_T *)(ga_userinput.ga_data)
81c2858
  						       + ga_userinput.ga_len);
81c2858
! 	/* default return is zero == OK */
81c2858
      }
81c2858
      else if (p_verbose > 1)
81c2858
      {
81c2858
***************
81c2858
*** 12488,12494 ****
81c2858
  	save_typeahead((tasave_T *)(ga_userinput.ga_data)
81c2858
  						       + ga_userinput.ga_len);
81c2858
  	++ga_userinput.ga_len;
81c2858
! 	rettv->vval.v_number = 0; /* OK */
81c2858
      }
81c2858
      else
81c2858
  	rettv->vval.v_number = 1; /* Failed */
81c2858
--- 12461,12467 ----
81c2858
  	save_typeahead((tasave_T *)(ga_userinput.ga_data)
81c2858
  						       + ga_userinput.ga_len);
81c2858
  	++ga_userinput.ga_len;
81c2858
! 	/* default return is zero == OK */
81c2858
      }
81c2858
      else
81c2858
  	rettv->vval.v_number = 1; /* Failed */
81c2858
***************
81c2858
*** 12522,12528 ****
81c2858
      list_T	*l;
81c2858
      int		error = FALSE;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type != VAR_LIST)
81c2858
  	EMSG2(_(e_listarg), "insert()");
81c2858
      else if ((l = argvars[0].vval.v_list) != NULL
81c2858
--- 12495,12500 ----
81c2858
***************
81c2858
*** 12641,12647 ****
81c2858
      dict_T	*d;
81c2858
      int		todo;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type != VAR_DICT)
81c2858
      {
81c2858
  	EMSG(_(e_dictreq));
81c2858
--- 12613,12618 ----
81c2858
***************
81c2858
*** 12729,12735 ****
81c2858
      garray_T	ga;
81c2858
      char_u	*sep;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type != VAR_LIST)
81c2858
      {
81c2858
  	EMSG(_(e_listreq));
81c2858
--- 12700,12705 ----
81c2858
***************
81c2858
*** 12827,12835 ****
81c2858
  #endif
81c2858
  
81c2858
      rettv->v_type = type;
81c2858
!     if (type == VAR_NUMBER)
81c2858
! 	rettv->vval.v_number = 0;
81c2858
!     else
81c2858
  	rettv->vval.v_string = NULL;
81c2858
  
81c2858
      if (check_restricted() || check_secure())
81c2858
--- 12797,12803 ----
81c2858
  #endif
81c2858
  
81c2858
      rettv->v_type = type;
81c2858
!     if (type != VAR_NUMBER)
81c2858
  	rettv->vval.v_string = NULL;
81c2858
  
81c2858
      if (check_restricted() || check_secure())
81c2858
***************
81c2858
*** 13770,13776 ****
81c2858
      typval_T	*argvars;
81c2858
      typval_T	*rettv;
81c2858
  {
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #ifdef FEAT_INS_EXPAND
81c2858
      if (pum_visible())
81c2858
  	rettv->vval.v_number = 1;
81c2858
--- 13738,13743 ----
81c2858
***************
81c2858
*** 13804,13810 ****
81c2858
  	    stride = get_tv_number_chk(&argvars[2], &error);
81c2858
      }
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (error)
81c2858
  	return;		/* type error; errmsg already given */
81c2858
      if (stride == 0)
81c2858
--- 13771,13776 ----
81c2858
***************
81c2858
*** 14193,14199 ****
81c2858
      typval_T	*argvars;
81c2858
      typval_T	*rettv;
81c2858
  {
81c2858
-     rettv->vval.v_number = 0;
81c2858
  #ifdef FEAT_CLIENTSERVER
81c2858
  # ifdef WIN32
81c2858
      /* On Win32 it's done in this application. */
81c2858
--- 14159,14164 ----
81c2858
***************
81c2858
*** 14249,14255 ****
81c2858
  	rettv->vval.v_number = (s != NULL);
81c2858
      }
81c2858
  # else
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (check_connection() == FAIL)
81c2858
  	return;
81c2858
  
81c2858
--- 14214,14219 ----
81c2858
***************
81c2858
*** 14338,14344 ****
81c2858
      dict_T	*d;
81c2858
      dictitem_T	*di;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type == VAR_DICT)
81c2858
      {
81c2858
  	if (argvars[2].v_type != VAR_UNKNOWN)
81c2858
--- 14302,14307 ----
81c2858
***************
81c2858
*** 14696,14702 ****
81c2858
      list_T	*l;
81c2858
      listitem_T	*li, *ni;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type != VAR_LIST)
81c2858
  	EMSG2(_(e_listarg), "reverse()");
81c2858
      else if ((l = argvars[0].vval.v_list) != NULL
81c2858
--- 14659,14664 ----
81c2858
***************
81c2858
*** 15048,15055 ****
81c2858
      int		lnum = 0;
81c2858
      int		col = 0;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
- 
81c2858
      if (rettv_list_alloc(rettv) == FAIL)
81c2858
  	return;
81c2858
  
81c2858
--- 15010,15015 ----
81c2858
***************
81c2858
*** 15236,15243 ****
81c2858
      int		n;
81c2858
      int		flags = 0;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
- 
81c2858
      if (rettv_list_alloc(rettv) == FAIL)
81c2858
  	return;
81c2858
  
81c2858
--- 15196,15201 ----
81c2858
***************
81c2858
*** 15323,15330 ****
81c2858
      typval_T	*varp;
81c2858
      char_u	nbuf[NUMBUFLEN];
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
- 
81c2858
      if (check_restricted() || check_secure())
81c2858
  	return;
81c2858
      (void)get_tv_number(&argvars[0]);	    /* issue errmsg if type error */
81c2858
--- 15281,15286 ----
81c2858
***************
81c2858
*** 15404,15410 ****
81c2858
      else
81c2858
  	line = get_tv_string_chk(&argvars[1]);
81c2858
  
81c2858
!     rettv->vval.v_number = 0;		/* OK */
81c2858
      for (;;)
81c2858
      {
81c2858
  	if (l != NULL)
81c2858
--- 15360,15366 ----
81c2858
      else
81c2858
  	line = get_tv_string_chk(&argvars[1]);
81c2858
  
81c2858
!     /* default result is zero == OK */
81c2858
      for (;;)
81c2858
      {
81c2858
  	if (l != NULL)
81c2858
***************
81c2858
*** 15717,15722 ****
81c2858
--- 15673,15679 ----
81c2858
  /*
81c2858
   * "setwinvar()" and "settabwinvar()" functions
81c2858
   */
81c2858
+ /*ARGSUSED*/
81c2858
      static void
81c2858
  setwinvar(argvars, rettv, off)
81c2858
      typval_T	*argvars;
81c2858
***************
81c2858
*** 15733,15740 ****
81c2858
      char_u	nbuf[NUMBUFLEN];
81c2858
      tabpage_T	*tp;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
- 
81c2858
      if (check_restricted() || check_secure())
81c2858
  	return;
81c2858
  
81c2858
--- 15690,15695 ----
81c2858
***************
81c2858
*** 15947,15953 ****
81c2858
      long	len;
81c2858
      long	i;
81c2858
  
81c2858
-     rettv->vval.v_number = 0;
81c2858
      if (argvars[0].v_type != VAR_LIST)
81c2858
  	EMSG2(_(e_listarg), "sort()");
81c2858
      else
81c2858
--- 15902,15907 ----
81c2858
***************
81c2858
*** 16870,16878 ****
81c2858
      typval_T	*argvars;
81c2858
      typval_T	*rettv;
81c2858
  {
81c2858
! #ifndef FEAT_WINDOWS
81c2858
!     rettv->vval.v_number = 0;
81c2858
! #else
81c2858
      tabpage_T	*tp;
81c2858
      win_T	*wp = NULL;
81c2858
  
81c2858
--- 16824,16830 ----
81c2858
      typval_T	*argvars;
81c2858
      typval_T	*rettv;
81c2858
  {
81c2858
! #ifdef FEAT_WINDOWS
81c2858
      tabpage_T	*tp;
81c2858
      win_T	*wp = NULL;
81c2858
  
81c2858
***************
81c2858
*** 16884,16902 ****
81c2858
  	if (tp != NULL)
81c2858
  	    wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
81c2858
      }
81c2858
!     if (wp == NULL)
81c2858
! 	rettv->vval.v_number = 0;
81c2858
!     else
81c2858
      {
81c2858
! 	if (rettv_list_alloc(rettv) == FAIL)
81c2858
! 	    rettv->vval.v_number = 0;
81c2858
! 	else
81c2858
! 	{
81c2858
! 	    for (; wp != NULL; wp = wp->w_next)
81c2858
! 		if (list_append_number(rettv->vval.v_list,
81c2858
  						wp->w_buffer->b_fnum) == FAIL)
81c2858
! 		    break;
81c2858
! 	}
81c2858
      }
81c2858
  #endif
81c2858
  }
81c2858
--- 16836,16847 ----
81c2858
  	if (tp != NULL)
81c2858
  	    wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
81c2858
      }
81c2858
!     if (wp != NULL && rettv_list_alloc(rettv) != FAIL)
81c2858
      {
81c2858
! 	for (; wp != NULL; wp = wp->w_next)
81c2858
! 	    if (list_append_number(rettv->vval.v_list,
81c2858
  						wp->w_buffer->b_fnum) == FAIL)
81c2858
! 		break;
81c2858
      }
81c2858
  #endif
81c2858
  }
81c2858
***************
81c2858
*** 17024,17033 ****
81c2858
      int		first;
81c2858
  
81c2858
      if (rettv_list_alloc(rettv) == FAIL)
81c2858
-     {
81c2858
- 	rettv->vval.v_number = 0;
81c2858
  	return;
81c2858
-     }
81c2858
  
81c2858
      for (first = TRUE; ; first = FALSE)
81c2858
  	if (get_tagfname(&tn, first, fname) == FAIL
81c2858
--- 16969,16975 ----
81c2858
***************
81c2858
*** 17401,17408 ****
81c2858
      /* A non-zero number or non-empty string argument: reset mode. */
81c2858
      if (non_zero_arg(&argvars[0]))
81c2858
  	curbuf->b_visual_mode_eval = NUL;
81c2858
- #else
81c2858
-     rettv->vval.v_number = 0; /* return anything, it won't work anyway */
81c2858
  #endif
81c2858
  }
81c2858
  
81c2858
--- 17343,17348 ----
81c2858
*** ../vim-7.2.148/src/version.c	Wed Mar 18 19:07:09 2009
81c2858
--- src/version.c	Wed Apr 22 12:44:05 2009
81c2858
***************
81c2858
*** 678,679 ****
81c2858
--- 678,681 ----
81c2858
  {   /* Add new patch number below this line */
81c2858
+ /**/
81c2858
+     149,
81c2858
  /**/
81c2858
81c2858
81c2858
-- 
81c2858
WOMAN:   Well, 'ow did you become king then?
81c2858
ARTHUR:  The Lady of the Lake, [angels sing] her arm clad in the purest
81c2858
         shimmering samite, held aloft Excalibur from the bosom of the water
81c2858
         signifying by Divine Providence that I, Arthur, was to carry
81c2858
         Excalibur.  [singing stops] That is why I am your king!
81c2858
                                  The Quest for the Holy Grail (Monty Python)
81c2858
81c2858
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
81c2858
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81c2858
\\\        download, build and distribute -- http://www.A-A-P.org        ///
81c2858
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///