073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.617
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.617
073263
Problem:    Wrong ":argdo" range does not cause an error.
073263
Solution:   Reset "cmd" to NULL. (Marcin Szamotulski, Ingo Karkat)
073263
Files:	    src/ex_docmd.c
073263
073263
073263
*** ../vim-7.4.616/src/ex_docmd.c	2015-01-14 21:21:56.920743646 +0100
073263
--- src/ex_docmd.c	2015-02-03 18:50:19.036177579 +0100
073263
***************
073263
*** 4405,4410 ****
073263
--- 4405,4411 ----
073263
  		if (addr_type != ADDR_LINES)
073263
  		{
073263
  		    EMSG(_(e_invaddr));
073263
+ 		    cmd = NULL;
073263
  		    goto error;
073263
  		}
073263
  		if (skip)
073263
***************
073263
*** 4436,4441 ****
073263
--- 4437,4443 ----
073263
  		if (addr_type != ADDR_LINES)
073263
  		{
073263
  		    EMSG(_(e_invaddr));
073263
+ 		    cmd = NULL;
073263
  		    goto error;
073263
  		}
073263
  		if (skip)	/* skip "/pat/" */
073263
***************
073263
*** 4484,4489 ****
073263
--- 4486,4492 ----
073263
  		if (addr_type != ADDR_LINES)
073263
  		{
073263
  		    EMSG(_(e_invaddr));
073263
+ 		    cmd = NULL;
073263
  		    goto error;
073263
  		}
073263
  		if (*cmd == '&')
073263
***************
073263
*** 4575,4581 ****
073263
  		n = getdigits(&cmd);
073263
  	    if (addr_type == ADDR_LOADED_BUFFERS
073263
  		    || addr_type == ADDR_BUFFERS)
073263
! 		lnum = compute_buffer_local_count(addr_type, lnum, (i == '-') ? -1 * n : n);
073263
  	    else if (i == '-')
073263
  		lnum -= n;
073263
  	    else
073263
--- 4578,4585 ----
073263
  		n = getdigits(&cmd);
073263
  	    if (addr_type == ADDR_LOADED_BUFFERS
073263
  		    || addr_type == ADDR_BUFFERS)
073263
! 		lnum = compute_buffer_local_count(
073263
! 				    addr_type, lnum, (i == '-') ? -1 * n : n);
073263
  	    else if (i == '-')
073263
  		lnum -= n;
073263
  	    else
073263
***************
073263
*** 4662,4668 ****
073263
  		    return (char_u *)_(e_invrange);
073263
  		break;
073263
  	    case ADDR_ARGUMENTS:
073263
! 		if (eap->line2 > ARGCOUNT + (!ARGCOUNT))    // add 1 if ARCOUNT is 0
073263
  		    return (char_u *)_(e_invrange);
073263
  		break;
073263
  	    case ADDR_BUFFERS:
073263
--- 4666,4673 ----
073263
  		    return (char_u *)_(e_invrange);
073263
  		break;
073263
  	    case ADDR_ARGUMENTS:
073263
! 		/* add 1 if ARGCOUNT is 0 */
073263
! 		if (eap->line2 > ARGCOUNT + (!ARGCOUNT))
073263
  		    return (char_u *)_(e_invrange);
073263
  		break;
073263
  	    case ADDR_BUFFERS:
073263
*** ../vim-7.4.616/src/version.c	2015-02-03 18:36:40.401033677 +0100
073263
--- src/version.c	2015-02-03 18:51:44.571251706 +0100
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     617,
073263
  /**/
073263
073263
-- 
073263
Living in Hollywood is like living in a bowl of granola.  What ain't
073263
fruits and nuts is flakes.
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    ///