058a333
To: vim-dev@vim.org
058a333
Subject: Patch 7.2.293
058a333
Fcc: outbox
058a333
From: Bram Moolenaar <Bram@moolenaar.net>
058a333
Mime-Version: 1.0
058a333
Content-Type: text/plain; charset=UTF-8
058a333
Content-Transfer-Encoding: 8bit
058a333
------------
058a333
058a333
Patch 7.2.293
058a333
Problem:    When setting 'comments' option it may be used in a wrong way. 
058a333
Solution:   Don't increment after skipping over digets. (Yukihiro Nakadaira)
058a333
Files:	    src/misc1.c
058a333
058a333
058a333
*** ../vim-7.2.292/src/misc1.c	2009-11-03 18:46:53.000000000 +0100
058a333
--- src/misc1.c	2009-11-11 17:27:38.000000000 +0100
058a333
***************
058a333
*** 1026,1037 ****
058a333
  		    int		c = 0;
058a333
  		    int		off = 0;
058a333
  
058a333
! 		    for (p = lead_flags; *p && *p != ':'; ++p)
058a333
  		    {
058a333
  			if (*p == COM_RIGHT || *p == COM_LEFT)
058a333
! 			    c = *p;
058a333
  			else if (VIM_ISDIGIT(*p) || *p == '-')
058a333
  			    off = getdigits(&p);
058a333
  		    }
058a333
  		    if (c == COM_RIGHT)    /* right adjusted leader */
058a333
  		    {
058a333
--- 1026,1039 ----
058a333
  		    int		c = 0;
058a333
  		    int		off = 0;
058a333
  
058a333
! 		    for (p = lead_flags; *p != NUL && *p != ':'; )
058a333
  		    {
058a333
  			if (*p == COM_RIGHT || *p == COM_LEFT)
058a333
! 			    c = *p++;
058a333
  			else if (VIM_ISDIGIT(*p) || *p == '-')
058a333
  			    off = getdigits(&p);
058a333
+ 			else
058a333
+ 			    ++p;
058a333
  		    }
058a333
  		    if (c == COM_RIGHT)    /* right adjusted leader */
058a333
  		    {
058a333
*** ../vim-7.2.292/src/version.c	2009-11-11 17:22:30.000000000 +0100
058a333
--- src/version.c	2009-11-11 17:29:24.000000000 +0100
058a333
***************
058a333
*** 683,684 ****
058a333
--- 683,686 ----
058a333
  {   /* Add new patch number below this line */
058a333
+ /**/
058a333
+     293,
058a333
  /**/
058a333
058a333
-- 
058a333
SOLDIER: What?  Ridden on a horse?
058a333
ARTHUR:  Yes!
058a333
SOLDIER: You're using coconuts!
058a333
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
058a333
058a333
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
058a333
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
058a333
\\\        download, build and distribute -- http://www.A-A-P.org        ///
058a333
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///