diff src/misc1.c @ 1996:077c15286de8 v7.2.293

updated for version 7.2-293
author vimboss
date Wed, 11 Nov 2009 16:30:08 +0000
parents 613517f0b72a
children 071166147fc5
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1026,12 +1026,14 @@ open_line(dir, flags, old_indent)
 		    int		c = 0;
 		    int		off = 0;
 
-		    for (p = lead_flags; *p && *p != ':'; ++p)
+		    for (p = lead_flags; *p != NUL && *p != ':'; )
 		    {
 			if (*p == COM_RIGHT || *p == COM_LEFT)
-			    c = *p;
+			    c = *p++;
 			else if (VIM_ISDIGIT(*p) || *p == '-')
 			    off = getdigits(&p);
+			else
+			    ++p;
 		    }
 		    if (c == COM_RIGHT)    /* right adjusted leader */
 		    {