]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-012 v7.1.012
authorBram Moolenaar <Bram@vim.org>
Tue, 19 Jun 2007 18:52:53 +0000 (18:52 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 19 Jun 2007 18:52:53 +0000 (18:52 +0000)
src/option.c
src/version.c

index 6177daf181bc6643f4d50589964e9f860eb32e88..b4beef1c819d901e7284344177ebd4e81b9b8919 100644 (file)
@@ -8219,6 +8219,25 @@ set_option_value(name, number, string, opt_flags)
            varp = get_varp(&options[opt_idx]);
            if (varp != NULL)   /* hidden option is not changed */
            {
+               if (number == 0 && string != NULL)
+               {
+                   int index;
+
+                   /* Either we are given a string or we are setting option
+                    * to zero. */
+                   for (index = 0; string[index] == '0'; ++index)
+                       ;
+                   if (string[index] != NUL || index == 0)
+                   {
+                       /* There's another character after zeros or the string
+                        * is empty.  In both cases, we are trying to set a
+                        * num option using a string. */
+                       EMSG3(_("E521: Number required: &%s = '%s'"),
+                                                               name, string);
+                       return;     /* do nothing as we hit an error */
+
+                   }
+               }
                if (flags & P_NUM)
                    (void)set_num_option(opt_idx, varp, number,
                                                          NULL, 0, opt_flags);
index 831db0f1c95bc56fe7b3b09492a2dcfaf1590944..85402c349290d71cfa13112339eb8ab68fc5a9ce 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    12,
 /**/
     11,
 /**/