summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-05-04 21:47:50 +0000
committerBram Moolenaar <Bram@vim.org>2006-05-04 21:47:50 +0000
commita9587610f1ae882c7a96d80cc9d9e49752911e0e (patch)
tree075aafd3f0d8dfffe434c3e50e2d5b78850886a1 /src/ex_docmd.c
parent3fb9eda7c93b6d7daac466f3d5ffdf0fad9474cb (diff)
downloadvim-git-a9587610f1ae882c7a96d80cc9d9e49752911e0e.tar.gz
updated for version 7.0g03
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 368d65c77..71ba6d6bc 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2997,11 +2997,14 @@ cmd_exists(name)
return (cmdmods[i].name[j] == NUL ? 2 : 1);
}
- /* Check built-in commands and user defined commands. */
- ea.cmd = name;
+ /* Check built-in commands and user defined commands.
+ * 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)
return 3;
+ if (vim_isdigit(*name) && ea.cmdidx != CMD_match)
+ return 0;
return (ea.cmdidx == CMD_SIZE ? 0 : (full ? 2 : 1));
}
#endif