summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-05-05 21:09:41 +0000
committerBram Moolenaar <Bram@vim.org>2006-05-05 21:09:41 +0000
commitf3a678875fd88038b18b83311075d1250d9d7ca5 (patch)
tree113e1084701cdc063f14bc0ec0e70851fab95233 /src/ex_docmd.c
parent54a709eb08f28b890f11b5ff44c260cc39502ee0 (diff)
downloadvim-git-f3a678875fd88038b18b83311075d1250d9d7ca5.tar.gz
updated for version 7.0g04
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 71ba6d6bc..f99525367 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2962,6 +2962,7 @@ cmd_exists(name)
int full = FALSE;
int i;
int j;
+ char_u *p;
static struct cmdmod
{
char *name;
@@ -3001,10 +3002,13 @@ cmd_exists(name)
* For ":2match" and ":3match" we need to skip the number. */
ea.cmd = (*name == '2' || *name == '3') ? name + 1 : name;
ea.cmdidx = (cmdidx_T)0;
- if (find_command(&ea, &full) == NULL)
+ p = find_command(&ea, &full);
+ if (p == NULL)
return 3;
if (vim_isdigit(*name) && ea.cmdidx != CMD_match)
return 0;
+ if (*skipwhite(p) != NUL)
+ return 0; /* trailing garbage */
return (ea.cmdidx == CMD_SIZE ? 0 : (full ? 2 : 1));
}
#endif
@@ -9884,7 +9888,7 @@ makeopens(fd, dirnow)
*/
if (put_line(fd, "if exists('s:wipebuf')") == FAIL)
return FAIL;
- if (put_line(fd, " exe 'bwipe ' . s:wipebuf") == FAIL)
+ if (put_line(fd, " silent exe 'bwipe ' . s:wipebuf") == FAIL)
return FAIL;
if (put_line(fd, "endif") == FAIL)
return FAIL;