diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-01-30 21:12:34 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-30 21:12:34 +0000 |
commit | ce93d162da8de2419c15b63286e2f72a8fe3bf2d (patch) | |
tree | c71709142faa5d59491146cd89733016bc93217a /src/eval.c | |
parent | b8bebd0cd78679162228ee08265c9a5b3a409e1c (diff) |
patch 9.0.1266: error for space before ": type" is inconsistentv9.0.1266
Problem: Error for space before ": type" is inconsistent.
Solution: Give E1059 in more places. (closes #11868)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 699f43bace..a0bbabfe3c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1093,7 +1093,7 @@ get_lval( --p; lp->ll_name_end = p; } - if (*p == ':') + if (*skipwhite(p) == ':') { char_u *tp = skipwhite(p + 1); @@ -1102,6 +1102,11 @@ get_lval( semsg(_(e_cannot_use_type_with_this_variable_str), name); return NULL; } + if (VIM_ISWHITE(*p)) + { + semsg(_(e_no_white_space_allowed_before_colon_str), p); + return NULL; + } if (tp == p + 1 && !quiet) { semsg(_(e_white_space_required_after_str_str), ":", p); |