diff options
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/misc1.c b/src/misc1.c index bb15d429d6..f7da7c4911 100644 --- 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 */ { |