vim-patch:8.2.4704: using "else" after return or break increases indent (#18032)

Problem:    Using "else" after return or break increases indent.
Solution:   Remove "else" and reduce indent. (Goc Dundar, closes vim/vim#10099)
f26c16144d
This commit is contained in:
zeertzjq
2022-04-08 10:25:22 +08:00
committed by GitHub
parent 4c9a71c69e
commit 356baae80a
4 changed files with 170 additions and 180 deletions

View File

@@ -1015,27 +1015,27 @@ 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++) {
if (p[ni] == NL) {
ptr[tlen++] = NUL;
} else {
ptr[tlen++] = p[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;
break;
}
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;
break;
}
}
}