diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-08-25 14:30:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 14:30:12 +0100 |
commit | 99f8d34c8a7128a9adb43168ca5364ccbd568333 (patch) | |
tree | 0a28a1505debe6e4d1025f9c518a7b0fe1ab769c /src/nvim/indent_c.c | |
parent | cd2d3aa48f3531103a3a355d76394301e7b074df (diff) | |
parent | 93f24403f8cc760ff47979c596976b53a8b16358 (diff) | |
download | rneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.tar.gz rneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.tar.bz2 rneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.zip |
Merge pull request #19934 from lewis6991/prepostincr
Diffstat (limited to 'src/nvim/indent_c.c')
-rw-r--r-- | src/nvim/indent_c.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c index 34a3de4f78..fe8c235cc1 100644 --- a/src/nvim/indent_c.c +++ b/src/nvim/indent_c.c @@ -383,7 +383,7 @@ bool cin_islabel(void) // XXX cursor_save = curwin->w_cursor; while (curwin->w_cursor.lnum > 1) { - --curwin->w_cursor.lnum; + curwin->w_cursor.lnum--; /* * If we're in a comment or raw string now, skip to the start of @@ -434,7 +434,7 @@ static int cin_isinit(void) for (;;) { int i, l; - for (i = 0; i < (int)ARRAY_SIZE(skip); ++i) { + for (i = 0; i < (int)ARRAY_SIZE(skip); i++) { l = (int)strlen(skip[i]); if (cin_starts_with(s, skip[i])) { s = cin_skipcomment(s + l); @@ -465,7 +465,7 @@ bool cin_iscase(const char_u *s, bool strict) { s = cin_skipcomment(s); if (cin_starts_with(s, "case")) { - for (s += 4; *s; ++s) { + for (s += 4; *s; s++) { s = cin_skipcomment(s); if (*s == NUL) { break; @@ -588,7 +588,7 @@ static bool cin_is_cpp_namespace(const char_u *s) */ static const char_u *after_label(const char_u *l) { - for (; *l; ++l) { + for (; *l; l++) { if (*l == ':') { if (l[1] == ':') { // skip over "::" for C++ l++; @@ -2330,7 +2330,7 @@ int get_c_indent(void) /* look for opening unmatched paren, indent one level * for each additional level */ n = 1; - for (col = 0; col < our_paren_pos.col; ++col) { + for (col = 0; col < our_paren_pos.col; col++) { switch (l[col]) { case '(': case '{': @@ -2388,7 +2388,7 @@ int get_c_indent(void) * but ignore (void) before the line (ignore_paren_col). */ col = our_paren_pos.col; while ((int)our_paren_pos.col > ignore_paren_col) { - --our_paren_pos.col; + our_paren_pos.col--; switch (*ml_get_pos(&our_paren_pos)) { case '(': amount += curbuf->b_ind_unclosed2; |