mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user