patch 8.2.4704: using "else" after return or break increases indent
Problem: Using "else" after return or break increases indent.
Solution: Remove "else" and reduce indent. (Goc Dundar, closes #10099)
diff --git a/src/fileio.c b/src/fileio.c
index af915c6..439789e 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1245,30 +1245,29 @@
read_buf_col += n;
break;
}
- else
+
+ // Append whole line and new-line. Change NL
+ // to NUL to reverse the effect done below.
+ for (ni = 0; ni < n; ++ni)
{
- // Append whole line and new-line. Change NL
- // to NUL to reverse the effect done below.
- for (ni = 0; ni < n; ++ni)
- {
- if (p[ni] == NL)
- ptr[tlen++] = NUL;
- else
- ptr[tlen++] = p[ni];
- }
- ptr[tlen++] = NL;
- read_buf_col = 0;
- if (++read_buf_lnum > from)
- {
- // When the last line didn't have an
- // end-of-line don't add it now either.
- if (!curbuf->b_p_eol)
- --tlen;
- size = tlen;
- eof = TRUE;
- break;
- }
+ if (p[ni] == NL)
+ ptr[tlen++] = NUL;
+ else
+ ptr[tlen++] = p[ni];
}
+ ptr[tlen++] = NL;
+ read_buf_col = 0;
+ if (++read_buf_lnum > from)
+ {
+ // When the last line didn't have an
+ // end-of-line don't add it now either.
+ if (!curbuf->b_p_eol)
+ --tlen;
+ size = tlen;
+ eof = TRUE;
+ break;
+ }
+
}
}
}