0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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)
This commit is contained in:
=?UTF-8?q?Dundar=20G=C3=B6c?=
2022-04-07 13:26:34 +01:00
committed by Bram Moolenaar
parent cb49a1d934
commit f26c16144d
5 changed files with 167 additions and 171 deletions

View File

@@ -1245,30 +1245,29 @@ retry:
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;
}
}
}
}