mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.1266: error for space before ": type" is inconsistent
Problem: Error for space before ": type" is inconsistent. Solution: Give E1059 in more places. (closes #11868)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user