mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1429: Vim9: no error for missing white after : in dict
Problem: Vim9: no error for missing white after : in dict. Solution: Check for white space. (closes #6671) Also check that there is no white before the :.
This commit is contained in:
@@ -2593,14 +2593,21 @@ compile_dict(char_u **arg, cctx_T *cctx, int literal)
|
||||
}
|
||||
}
|
||||
|
||||
*arg = skipwhite(*arg);
|
||||
if (**arg != ':')
|
||||
{
|
||||
semsg(_(e_missing_dict_colon), *arg);
|
||||
if (*skipwhite(*arg) == ':')
|
||||
semsg(_(e_no_white_before), ":");
|
||||
else
|
||||
semsg(_(e_missing_dict_colon), *arg);
|
||||
return FAIL;
|
||||
}
|
||||
whitep = *arg + 1;
|
||||
if (!IS_WHITE_OR_NUL(*whitep))
|
||||
{
|
||||
semsg(_(e_white_after), ":");
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
whitep = *arg + 1;
|
||||
*arg = skipwhite(*arg + 1);
|
||||
if (may_get_next_line(whitep, arg, cctx) == FAIL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user