diff options
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 185fc49cb4..105710b016 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3274,10 +3274,10 @@ find_ex_command( if (lookup != NULL) { // Skip over first char for "&opt = val", "$ENV = val" and "@r = val". - char_u *pskip = (*eap->cmd == '&' || *eap->cmd == '$' - || *eap->cmd == '@') ? eap->cmd + 1 : eap->cmd; + char_u *pskip = (*eap->cmd == '&' || *eap->cmd == '$') + ? eap->cmd + 1 : eap->cmd; - if (vim_strchr((char_u *)"{('[\"", *p) != NULL + if (vim_strchr((char_u *)"{('[\"@", *p) != NULL || ((p = to_name_const_end(pskip)) > eap->cmd && *p != NUL)) { int oplen; @@ -3336,6 +3336,8 @@ find_ex_command( // Recognize an assignment if we recognize the variable name: // "g:var = expr" // "var = expr" where "var" is a local var name. + if (*eap->cmd == '@') + p = eap->cmd + 2; oplen = assignment_len(skipwhite(p), &heredoc); if (oplen > 0) { |