]> granicus.if.org Git - vim/commitdiff
patch 9.0.0159: cannot build with small features v9.0.0159
authorBram Moolenaar <Bram@vim.org>
Sat, 6 Aug 2022 21:13:03 +0000 (22:13 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 6 Aug 2022 21:13:03 +0000 (22:13 +0100)
Problem:    Cannot build with small features.
Solution:   Check for E1170 only with FEAT_EVAL.

src/ex_docmd.c
src/version.c
src/vim9script.c

index d8a724393b7f0992682c0c4dca3a45ac2d7d4305..70c54025bdc0df2d1d607c6463981d91d75b748f 100644 (file)
@@ -2846,9 +2846,11 @@ parse_command_modifiers(
            {
                if (has_cmdmod(cmod, FALSE))
                    *errormsg = _(e_command_modifier_without_command);
+#ifdef FEAT_EVAL
                if (eap->cmd[0] == '#' && eap->cmd[1] == '{'
                                                         && eap->cmd[2] != '{')
                    *errormsg = _(e_cannot_use_hash_curly_to_start_comment);
+#endif
            }
            return FAIL;
        }
index 0a39e5d9d73fc7b0dea36af46b3a64fc8bf0e7b4..813ff63e0e73377db5b6b236eb0f2c35aff2238a 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    159,
 /**/
     158,
 /**/
index e9c9b2c7dca6e4c9d0f0531a5a894fafc2d4b6d3..6f843620778e5e7ae54a371b46d55011306d3a6d 100644 (file)
@@ -202,7 +202,11 @@ vim9_bad_comment(char_u *p)
     int
 vim9_comment_start(char_u *p)
 {
+#ifdef FEAT_EVAL
     return p[0] == '#' && !vim9_bad_comment(p);
+#else
+    return p[0] == '#' && (p[1] != '{' || p[2] == '{');
+#endif
 }
 
 #if defined(FEAT_EVAL) || defined(PROTO)