summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-11 15:14:05 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-11 15:14:05 +0100
commit9510d22463055f56548ff461ccbc54caa1ba1a2f (patch)
tree5c084eccddd0a17e08c4bba2d5fec6d4cc969144 /src/ex_docmd.c
parentcce82a55b8105560a2ef724999c856966337b48e (diff)
patch 9.0.0444: trying to declare g:variable gives confusing errorv9.0.0444
Problem: Trying to declare g:variable gives confusing error. Solution: Give a better error message. (closes #11108)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 0024c99c63..0e5e1db5ec 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3761,11 +3761,11 @@ find_ex_command(
}
}
- // Recognize using a type for a w:, b:, t: or g: variable:
+ // Recognize trying to use a type for a w:, b:, t: or g: variable:
// "w:varname: number = 123".
if (eap->cmd[1] == ':' && *p == ':')
{
- eap->cmdidx = CMD_eval;
+ eap->cmdidx = CMD_var;
return eap->cmd;
}
}