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.3 / 7.3.024 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  3.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.3.024
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.024
  11. Problem:    Named signs do not use a negative number as intended.
  12. Solution:   Fix the numbering of named signs. (Xavier de Gaye)
  13. Files:        src/ex_cmds.c
  14.  
  15.  
  16. *** ../vim-7.3.023/src/ex_cmds.c    2010-09-21 16:56:29.000000000 +0200
  17. --- src/ex_cmds.c    2010-10-13 16:37:18.000000000 +0200
  18. ***************
  19. *** 6670,6680 ****
  20.               sp = (sign_T *)alloc_clear((unsigned)sizeof(sign_T));
  21.               if (sp == NULL)
  22.               return;
  23. -             if (sp_prev == NULL)
  24. -             first_sign = sp;
  25. -             else
  26. -             sp_prev->sn_next = sp;
  27. -             sp->sn_name = vim_strnsave(arg, (int)(p - arg));
  28.   
  29.               /* If the name is a number use that for the typenr,
  30.                * otherwise use a negative number. */
  31. --- 6670,6675 ----
  32. ***************
  33. *** 6687,6699 ****
  34.   
  35.               for (lp = first_sign; lp != NULL; lp = lp->sn_next)
  36.               {
  37. !                 if (lp->sn_typenr == last_sign_typenr)
  38.                   {
  39.                   --last_sign_typenr;
  40.                   if (last_sign_typenr == 0)
  41.                       last_sign_typenr = MAX_TYPENR;
  42.                   if (last_sign_typenr == start)
  43.                   {
  44.                       EMSG(_("E612: Too many signs defined"));
  45.                       return;
  46.                   }
  47. --- 6682,6695 ----
  48.   
  49.               for (lp = first_sign; lp != NULL; lp = lp->sn_next)
  50.               {
  51. !                 if (lp->sn_typenr == -last_sign_typenr)
  52.                   {
  53.                   --last_sign_typenr;
  54.                   if (last_sign_typenr == 0)
  55.                       last_sign_typenr = MAX_TYPENR;
  56.                   if (last_sign_typenr == start)
  57.                   {
  58. +                     vim_free(sp);
  59.                       EMSG(_("E612: Too many signs defined"));
  60.                       return;
  61.                   }
  62. ***************
  63. *** 6702,6711 ****
  64.                   }
  65.               }
  66.   
  67. !             sp->sn_typenr = last_sign_typenr--;
  68. !             if (last_sign_typenr == 0)
  69.                   last_sign_typenr = MAX_TYPENR; /* wrap around */
  70.               }
  71.           }
  72.   
  73.           /* set values for a defined sign. */
  74. --- 6698,6714 ----
  75.                   }
  76.               }
  77.   
  78. !             sp->sn_typenr = -last_sign_typenr;
  79. !             if (--last_sign_typenr == 0)
  80.                   last_sign_typenr = MAX_TYPENR; /* wrap around */
  81.               }
  82. +             /* add the new sign to the list of signs */
  83. +             if (sp_prev == NULL)
  84. +             first_sign = sp;
  85. +             else
  86. +             sp_prev->sn_next = sp;
  87. +             sp->sn_name = vim_strnsave(arg, (int)(p - arg));
  88.           }
  89.   
  90.           /* set values for a defined sign. */
  91. *** ../vim-7.3.023/src/version.c    2010-10-13 16:22:05.000000000 +0200
  92. --- src/version.c    2010-10-13 16:42:14.000000000 +0200
  93. ***************
  94. *** 716,717 ****
  95. --- 716,719 ----
  96.   {   /* Add new patch number below this line */
  97. + /**/
  98. +     24,
  99.   /**/
  100.  
  101. -- 
  102.        In war we're tough and able.
  103.        Quite indefatigable
  104.        Between our quests
  105.        We sequin vests
  106.        And impersonate Clark Gable
  107.        It's a busy life in Camelot.
  108.        I have to push the pram a lot.
  109.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  110.  
  111.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  112. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  113. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  114.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  115.