1
0
forked from aniani/vim

patch 8.2.3815: Vim9: cannot have a multi-line dict inside a block

Problem:    Vim9: cannot have a multi-line dict inside a block.
Solution:   Do not split the command at a line break, handle NL characters
            as white space.
This commit is contained in:
Bram Moolenaar
2021-12-15 15:41:44 +00:00
parent cfabad9bcf
commit ce7eada12e
6 changed files with 34 additions and 4 deletions

View File

@@ -1459,14 +1459,27 @@ getvcols(
}
/*
* skipwhite: skip over ' ' and '\t'.
* Skip over ' ' and '\t'.
*/
char_u *
skipwhite(char_u *q)
{
char_u *p = q;
while (VIM_ISWHITE(*p)) // skip to next non-white
while (VIM_ISWHITE(*p))
++p;
return p;
}
/*
* skip over ' ', '\t' and '\n'.
*/
char_u *
skipwhite_and_nl(char_u *q)
{
char_u *p = q;
while (VIM_ISWHITE(*p) || *p == NL)
++p;
return p;
}