diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-15 15:41:44 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-15 15:41:44 +0000 |
commit | ce7eada12ea16c830332042f0021a9564bbb25af (patch) | |
tree | fce1a25ce1feba54a4f3e5154f3bd2200d133c20 /src/charset.c | |
parent | cfabad9bcf45650dee1f1f41ec4047f82a12f323 (diff) |
patch 8.2.3815: Vim9: cannot have a multi-line dict inside a blockv8.2.3815
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.
Diffstat (limited to 'src/charset.c')
-rw-r--r-- | src/charset.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/charset.c b/src/charset.c index 0c17140c75..31b03eb38a 100644 --- a/src/charset.c +++ b/src/charset.c @@ -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; } |