diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-18 17:45:38 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-18 17:45:38 +0200 |
commit | a494f56f885876c98a276f7acfa386bfbb344680 (patch) | |
tree | 64fdbf4180e8b761bb267fbaa5d3b63f7a49f476 /src/ex_docmd.c | |
parent | 2695de63e370235c4d3d73e3fe07cc1006de3460 (diff) | |
download | vim-git-a494f56f885876c98a276f7acfa386bfbb344680.tar.gz |
patch 8.2.0593: finding a user command is not optimalv8.2.0593
Problem: Finding a user command is not optimal.
Solution: Start further down in the list of commands.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index c70a4334c..25040df22 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3153,9 +3153,9 @@ append_command(char_u *cmd) char_u * find_ex_command( exarg_T *eap, - int *full UNUSED, - int (*lookup)(char_u *, size_t, cctx_T *) UNUSED, - cctx_T *cctx UNUSED) + int *full UNUSED, + int (*lookup)(char_u *, size_t, cctx_T *) UNUSED, + cctx_T *cctx UNUSED) { int len; char_u *p; @@ -3285,6 +3285,8 @@ find_ex_command( if (ASCII_ISLOWER(c2)) eap->cmdidx += cmdidxs2[CharOrdLow(c1)][CharOrdLow(c2)]; } + else if (ASCII_ISUPPER(eap->cmd[0])) + eap->cmdidx = CMD_Next; else eap->cmdidx = CMD_bang; @@ -4766,7 +4768,7 @@ ex_blast(exarg_T *eap) /* * Check if "c" ends an Ex command. - * In Vim9 script does not check for white space before #. + * In Vim9 script does not check for white space before # or #{. */ int ends_excmd(int c) |