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