Mirror of the Vim source from https://github.com/vim/vim
Revision | f4c7b5da017adf78554a240587384823e58ba80c (tree) |
---|---|
Zeit | 2007-06-20 03:52:53 |
Autor | vimboss |
Commiter | vimboss |
updated for version 7.1-012
@@ -8219,6 +8219,25 @@ | ||
8219 | 8219 | varp = get_varp(&options[opt_idx]); |
8220 | 8220 | if (varp != NULL) /* hidden option is not changed */ |
8221 | 8221 | { |
8222 | + if (number == 0 && string != NULL) | |
8223 | + { | |
8224 | + int index; | |
8225 | + | |
8226 | + /* Either we are given a string or we are setting option | |
8227 | + * to zero. */ | |
8228 | + for (index = 0; string[index] == '0'; ++index) | |
8229 | + ; | |
8230 | + if (string[index] != NUL || index == 0) | |
8231 | + { | |
8232 | + /* There's another character after zeros or the string | |
8233 | + * is empty. In both cases, we are trying to set a | |
8234 | + * num option using a string. */ | |
8235 | + EMSG3(_("E521: Number required: &%s = '%s'"), | |
8236 | + name, string); | |
8237 | + return; /* do nothing as we hit an error */ | |
8238 | + | |
8239 | + } | |
8240 | + } | |
8222 | 8241 | if (flags & P_NUM) |
8223 | 8242 | (void)set_num_option(opt_idx, varp, number, |
8224 | 8243 | NULL, 0, opt_flags); |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 12, | |
671 | +/**/ | |
670 | 672 | 11, |
671 | 673 | /**/ |
672 | 674 | 10, |