diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-03-14 13:21:35 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-03-14 13:21:35 +0100 |
commit | 77b10ffad4ebad15022614be4db2745f6a90f405 (patch) | |
tree | 8319b6d1ba747e28f7ef57082978d9be464049c5 /src/ex_docmd.c | |
parent | 2e34c34be1393027a761ecbccd8f267d52ca7bc1 (diff) |
patch 8.2.2603: Vim9: no effect if user command is also a functionv8.2.2603
Problem: Vim9: no effect if user command is also a function.
Solution: Check for paren following. (closes #7960)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index c7b57ba992..477d140bde 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3311,7 +3311,7 @@ skip_option_env_lead(char_u *start) find_ex_command( exarg_T *eap, int *full UNUSED, - int (*lookup)(char_u *, size_t, cctx_T *) UNUSED, + int (*lookup)(char_u *, size_t, int cmd, cctx_T *) UNUSED, cctx_T *cctx UNUSED) { int len; @@ -3430,7 +3430,7 @@ find_ex_command( || *eap->cmd == '&' || *eap->cmd == '$' || *eap->cmd == '@' - || lookup(eap->cmd, p - eap->cmd, cctx) == OK) + || lookup(eap->cmd, p - eap->cmd, TRUE, cctx) == OK) { eap->cmdidx = CMD_var; return eap->cmd; @@ -3449,7 +3449,7 @@ find_ex_command( // If it is an ID it might be a variable with an operator on the next // line, if the variable exists it can't be an Ex command. if (p > eap->cmd && ends_excmd(*skipwhite(p)) - && (lookup(eap->cmd, p - eap->cmd, cctx) == OK + && (lookup(eap->cmd, p - eap->cmd, TRUE, cctx) == OK || (ASCII_ISALPHA(eap->cmd[0]) && eap->cmd[1] == ':'))) { eap->cmdidx = CMD_eval; |