0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.4.617

Problem:    Wrong ":argdo" range does not cause an error.
Solution:   Reset "cmd" to NULL. (Marcin Szamotulski, Ingo Karkat)
This commit is contained in:
Bram Moolenaar 2015-02-03 19:10:53 +01:00
parent f2c03d7301
commit c0a37b9db3
2 changed files with 9 additions and 2 deletions

View File

@ -4405,6 +4405,7 @@ get_address(ptr, addr_type, skip, to_other_file)
if (addr_type != ADDR_LINES) if (addr_type != ADDR_LINES)
{ {
EMSG(_(e_invaddr)); EMSG(_(e_invaddr));
cmd = NULL;
goto error; goto error;
} }
if (skip) if (skip)
@ -4436,6 +4437,7 @@ get_address(ptr, addr_type, skip, to_other_file)
if (addr_type != ADDR_LINES) if (addr_type != ADDR_LINES)
{ {
EMSG(_(e_invaddr)); EMSG(_(e_invaddr));
cmd = NULL;
goto error; goto error;
} }
if (skip) /* skip "/pat/" */ if (skip) /* skip "/pat/" */
@ -4484,6 +4486,7 @@ get_address(ptr, addr_type, skip, to_other_file)
if (addr_type != ADDR_LINES) if (addr_type != ADDR_LINES)
{ {
EMSG(_(e_invaddr)); EMSG(_(e_invaddr));
cmd = NULL;
goto error; goto error;
} }
if (*cmd == '&') if (*cmd == '&')
@ -4575,7 +4578,8 @@ get_address(ptr, addr_type, skip, to_other_file)
n = getdigits(&cmd); n = getdigits(&cmd);
if (addr_type == ADDR_LOADED_BUFFERS if (addr_type == ADDR_LOADED_BUFFERS
|| addr_type == ADDR_BUFFERS) || addr_type == ADDR_BUFFERS)
lnum = compute_buffer_local_count(addr_type, lnum, (i == '-') ? -1 * n : n); lnum = compute_buffer_local_count(
addr_type, lnum, (i == '-') ? -1 * n : n);
else if (i == '-') else if (i == '-')
lnum -= n; lnum -= n;
else else
@ -4662,7 +4666,8 @@ invalid_range(eap)
return (char_u *)_(e_invrange); return (char_u *)_(e_invrange);
break; break;
case ADDR_ARGUMENTS: case ADDR_ARGUMENTS:
if (eap->line2 > ARGCOUNT + (!ARGCOUNT)) // add 1 if ARCOUNT is 0 /* add 1 if ARGCOUNT is 0 */
if (eap->line2 > ARGCOUNT + (!ARGCOUNT))
return (char_u *)_(e_invrange); return (char_u *)_(e_invrange);
break; break;
case ADDR_BUFFERS: case ADDR_BUFFERS:

View File

@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
617,
/**/ /**/
616, 616,
/**/ /**/