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:
committed by
Bram Moolenaar
parent
cb49a1d934
commit
f26c16144d
43
src/fileio.c
43
src/fileio.c
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user