4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: ":let &shiftwidth = 'asdf'" doesn't produce an error message.
12 Solution: Check for a string argument. (Chris Lubinski)
16 *** ../vim-7.1.011/src/option.c Sun May 6 15:37:32 2007
17 --- src/option.c Tue Jun 19 20:56:36 2007
21 varp = get_varp(&options[opt_idx]);
22 if (varp != NULL) /* hidden option is not changed */
24 + if (number == 0 && string != NULL)
28 + /* Either we are given a string or we are setting option
30 + for (index = 0; string[index] == '0'; ++index)
32 + if (string[index] != NUL || index == 0)
34 + /* There's another character after zeros or the string
35 + * is empty. In both cases, we are trying to set a
36 + * num option using a string. */
37 + EMSG3(_("E521: Number required: &%s = '%s'"),
39 + return; /* do nothing as we hit an error */
44 (void)set_num_option(opt_idx, varp, number,
46 *** ../vim-7.1.011/src/version.c Tue Jun 19 20:30:46 2007
47 --- src/version.c Tue Jun 19 20:53:15 2007
51 { /* Add new patch number below this line */
57 Ten million Linux users can't be wrong!
59 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
60 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
61 \\\ download, build and distribute -- http://www.A-A-P.org ///
62 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///