Problem: In 'cinoptions' "0s" is interpreted as one shiftwidth. (David
Pineau)
Solution: Use the zero as zero. (Lech Lorens)
int whilelevel;
linenr_T lnum;
char_u *options;
+ char_u *digits;
int fraction = 0; /* init for GCC */
int divider;
int n;
l = options++;
if (*options == '-')
++options;
+ digits = options; /* remember where the digits start */
n = getdigits(&options);
divider = 0;
if (*options == '.') /* ".5s" means a fraction */
}
if (*options == 's') /* "2s" means two times 'shiftwidth' */
{
- if (n == 0 && fraction == 0)
+ if (options == digits)
n = curbuf->b_p_sw; /* just "s" is one 'shiftwidth' */
else
{
}
+STARTTEST
+:set cin
+:set cino=es,n0s
+/main
+=][
+ENDTEST
+
+main(void)
+{
+ /* Make sure that cino=X0s is not parsed like cino=Xs. */
+ if (cond)
+ foo();
+ else
+ {
+ bar();
+ }
+}
+
STARTTEST
:set cin
:set cino=
}
+main(void)
+{
+ /* Make sure that cino=X0s is not parsed like cino=Xs. */
+ if (cond)
+ foo();
+ else
+ {
+ bar();
+ }
+}
+
+
{
do
{
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 549,
/**/
548,
/**/