refactor: change pre-decrement/increment to post (#19799)

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
Lewis Russell
2022-08-16 12:26:08 +01:00
committed by GitHub
parent 9a4b8dc603
commit 542fa8a9cc
32 changed files with 351 additions and 360 deletions

View File

@@ -863,7 +863,7 @@ int foldMoveTo(const bool updown, const int dir, const long count)
if (fp - (fold_T *)gap->ga_data >= gap->ga_len) {
break;
}
--fp;
fp--;
} else {
if (fp == (fold_T *)gap->ga_data) {
break;
@@ -1793,7 +1793,7 @@ static void foldtext_cleanup(char_u *str)
char_u *cms_start = (char_u *)skipwhite((char *)curbuf->b_p_cms);
size_t cms_slen = STRLEN(cms_start);
while (cms_slen > 0 && ascii_iswhite(cms_start[cms_slen - 1])) {
--cms_slen;
cms_slen--;
}
// locate "%s" in 'commentstring', use the part before and after it.
@@ -1805,7 +1805,7 @@ static void foldtext_cleanup(char_u *str)
// exclude white space before "%s"
while (cms_slen > 0 && ascii_iswhite(cms_start[cms_slen - 1])) {
--cms_slen;
cms_slen--;
}
// skip "%s" and white space after it