diff src/charset.c @ 26572:9f7568104726 v8.2.3815

patch 8.2.3815: Vim9: cannot have a multi-line dict inside a block Commit: https://github.com/vim/vim/commit/ce7eada12ea16c830332042f0021a9564bbb25af Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 15 15:41:44 2021 +0000 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 15 Dec 2021 16:45:03 +0100
parents 227543e4181f
children 1e3c49c09260
line wrap: on
line diff
--- 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;
 }