aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fold.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-08-16 12:26:08 +0100
committerGitHub <noreply@github.com>2022-08-16 12:26:08 +0100
commit542fa8a9cc10abb8eddab25a19844d19b94f53c1 (patch)
treefa29fc00d016beaddd5893336c19d12757e16494 /src/nvim/fold.c
parent9a4b8dc603fb9f5a804d69951848e0ff75d0905f (diff)
downloadrneovim-542fa8a9cc10abb8eddab25a19844d19b94f53c1.tar.gz
rneovim-542fa8a9cc10abb8eddab25a19844d19b94f53c1.tar.bz2
rneovim-542fa8a9cc10abb8eddab25a19844d19b94f53c1.zip
refactor: change pre-decrement/increment to post (#19799)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r--src/nvim/fold.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c
index b02c12c7cb..5f4509647e 100644
--- a/src/nvim/fold.c
+++ b/src/nvim/fold.c
@@ -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