home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.1 / 7.1.012 < prev    next >
Encoding:
Internet Message Format  |  2007-11-19  |  1.9 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 7.1.012
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.1.012
  11. Problem:    ":let &shiftwidth = 'asdf'" doesn't produce an error message.
  12. Solution:   Check for a string argument. (Chris Lubinski)
  13. Files:        src/option.c
  14.  
  15.  
  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
  18. ***************
  19. *** 8219,8224 ****
  20. --- 8219,8243 ----
  21.           varp = get_varp(&options[opt_idx]);
  22.           if (varp != NULL)    /* hidden option is not changed */
  23.           {
  24. +         if (number == 0 && string != NULL)
  25. +         {
  26. +             int index;
  27. +             /* Either we are given a string or we are setting option
  28. +              * to zero. */
  29. +             for (index = 0; string[index] == '0'; ++index)
  30. +             ;
  31. +             if (string[index] != NUL || index == 0)
  32. +             {
  33. +             /* There's another character after zeros or the string
  34. +              * is empty.  In both cases, we are trying to set a
  35. +              * num option using a string. */
  36. +             EMSG3(_("E521: Number required: &%s = '%s'"),
  37. +                                 name, string);
  38. +             return;     /* do nothing as we hit an error */
  39. +             }
  40. +         }
  41.           if (flags & P_NUM)
  42.               (void)set_num_option(opt_idx, varp, number,
  43.                                 NULL, 0, opt_flags);
  44. *** ../vim-7.1.011/src/version.c    Tue Jun 19 20:30:46 2007
  45. --- src/version.c    Tue Jun 19 20:53:15 2007
  46. ***************
  47. *** 668,669 ****
  48. --- 668,671 ----
  49.   {   /* Add new patch number below this line */
  50. + /**/
  51. +     12,
  52.   /**/
  53.  
  54. -- 
  55. Ten million Linux users can't be wrong!
  56.  
  57.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  58. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  59. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  60.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  61.