Blame SOURCES/7.4.617

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.617
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.617
22c937
Problem:    Wrong ":argdo" range does not cause an error.
22c937
Solution:   Reset "cmd" to NULL. (Marcin Szamotulski, Ingo Karkat)
22c937
Files:	    src/ex_docmd.c
22c937
22c937
22c937
*** ../vim-7.4.616/src/ex_docmd.c	2015-01-14 21:21:56.920743646 +0100
22c937
--- src/ex_docmd.c	2015-02-03 18:50:19.036177579 +0100
22c937
***************
22c937
*** 4405,4410 ****
22c937
--- 4405,4411 ----
22c937
  		if (addr_type != ADDR_LINES)
22c937
  		{
22c937
  		    EMSG(_(e_invaddr));
22c937
+ 		    cmd = NULL;
22c937
  		    goto error;
22c937
  		}
22c937
  		if (skip)
22c937
***************
22c937
*** 4436,4441 ****
22c937
--- 4437,4443 ----
22c937
  		if (addr_type != ADDR_LINES)
22c937
  		{
22c937
  		    EMSG(_(e_invaddr));
22c937
+ 		    cmd = NULL;
22c937
  		    goto error;
22c937
  		}
22c937
  		if (skip)	/* skip "/pat/" */
22c937
***************
22c937
*** 4484,4489 ****
22c937
--- 4486,4492 ----
22c937
  		if (addr_type != ADDR_LINES)
22c937
  		{
22c937
  		    EMSG(_(e_invaddr));
22c937
+ 		    cmd = NULL;
22c937
  		    goto error;
22c937
  		}
22c937
  		if (*cmd == '&')
22c937
***************
22c937
*** 4575,4581 ****
22c937
  		n = getdigits(&cmd);
22c937
  	    if (addr_type == ADDR_LOADED_BUFFERS
22c937
  		    || addr_type == ADDR_BUFFERS)
22c937
! 		lnum = compute_buffer_local_count(addr_type, lnum, (i == '-') ? -1 * n : n);
22c937
  	    else if (i == '-')
22c937
  		lnum -= n;
22c937
  	    else
22c937
--- 4578,4585 ----
22c937
  		n = getdigits(&cmd);
22c937
  	    if (addr_type == ADDR_LOADED_BUFFERS
22c937
  		    || addr_type == ADDR_BUFFERS)
22c937
! 		lnum = compute_buffer_local_count(
22c937
! 				    addr_type, lnum, (i == '-') ? -1 * n : n);
22c937
  	    else if (i == '-')
22c937
  		lnum -= n;
22c937
  	    else
22c937
***************
22c937
*** 4662,4668 ****
22c937
  		    return (char_u *)_(e_invrange);
22c937
  		break;
22c937
  	    case ADDR_ARGUMENTS:
22c937
! 		if (eap->line2 > ARGCOUNT + (!ARGCOUNT))    // add 1 if ARCOUNT is 0
22c937
  		    return (char_u *)_(e_invrange);
22c937
  		break;
22c937
  	    case ADDR_BUFFERS:
22c937
--- 4666,4673 ----
22c937
  		    return (char_u *)_(e_invrange);
22c937
  		break;
22c937
  	    case ADDR_ARGUMENTS:
22c937
! 		/* add 1 if ARGCOUNT is 0 */
22c937
! 		if (eap->line2 > ARGCOUNT + (!ARGCOUNT))
22c937
  		    return (char_u *)_(e_invrange);
22c937
  		break;
22c937
  	    case ADDR_BUFFERS:
22c937
*** ../vim-7.4.616/src/version.c	2015-02-03 18:36:40.401033677 +0100
22c937
--- src/version.c	2015-02-03 18:51:44.571251706 +0100
22c937
***************
22c937
*** 743,744 ****
22c937
--- 743,746 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     617,
22c937
  /**/
22c937
22c937
-- 
22c937
Living in Hollywood is like living in a bowl of granola.  What ain't
22c937
fruits and nuts is flakes.
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///