aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.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/ex_getln.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/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index a2e94d500b..bce5ec3ce5 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2156,14 +2156,14 @@ static int command_line_handle_key(CommandLineState *s)
if (i > 0) {
ccline.cmdbuff[len] = '\\';
}
- ++len;
+ len++;
}
if (i > 0) {
ccline.cmdbuff[len] = p[j];
}
}
- ++len;
+ len++;
}
if (i == 0) {
@@ -3589,7 +3589,7 @@ void put_on_cmdline(char_u *str, int len, int redraw)
msg_col -= i;
if (msg_col < 0) {
msg_col += Columns;
- --msg_row;
+ msg_row--;
}
}
}
@@ -4135,9 +4135,9 @@ char_u *ExpandOne(expand_T *xp, char_u *str, char_u *orig, int options, int mode
if (findex == -1) {
findex = xp->xp_numfiles;
}
- --findex;
+ findex--;
} else { // mode == WILD_NEXT
- ++findex;
+ findex++;
}
/*
@@ -4877,7 +4877,7 @@ char_u *addstar(char_u *fname, size_t len, int context)
&& vim_strchr((char *)retval, '`') == NULL) {
retval[len++] = '*';
} else if (len > 0 && retval[len - 1] == '$') {
- --len;
+ len--;
}
retval[len] = NUL;
}
@@ -5518,7 +5518,7 @@ static void expand_shellcmd(char_u *filepat, int *num_file, char ***file, int fl
}
}
if (*e != NUL) {
- ++e;
+ e++;
}
}
*file = ga.ga_data;