aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent_c.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/indent_c.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/indent_c.c')
-rw-r--r--src/nvim/indent_c.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c
index 8edff55821..34a3de4f78 100644
--- a/src/nvim/indent_c.c
+++ b/src/nvim/indent_c.c
@@ -317,17 +317,17 @@ static bool cin_has_js_key(const char_u *text)
if (*s == '\'' || *s == '"') {
// can be 'key': or "key":
quote = *s;
- ++s;
+ s++;
}
if (!vim_isIDc(*s)) { // need at least one ID character
return false;
}
while (vim_isIDc(*s)) {
- ++s;
+ s++;
}
if (*s && *s == quote) {
- ++s;
+ s++;
}
s = cin_skipcomment(s);
@@ -1768,7 +1768,7 @@ void parse_cino(buf_T *buf)
n += (sw * fraction + divider / 2) / divider;
}
}
- ++p;
+ p++;
}
if (l[1] == '-') {
n = -n;
@@ -3334,7 +3334,7 @@ int get_c_indent(void)
amount += curbuf->b_ind_open_extra;
}
}
- ++whilelevel;
+ whilelevel++;
}
/*
* We are after a "normal" statement.
@@ -3848,7 +3848,7 @@ static int find_match(int lookfor, linenr_T ourscope)
* another "do", so increment whilelevel. XXX
*/
if (cin_iswhileofdo(look, curwin->w_cursor.lnum)) {
- ++whilelevel;
+ whilelevel++;
continue;
}