aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-08-24 22:49:25 +0100
committerLewis Russell <lewis6991@gmail.com>2022-08-25 13:10:41 +0100
commit93f24403f8cc760ff47979c596976b53a8b16358 (patch)
tree93d2d2879aba8d563fde484d1fae5864b18134bc /src/nvim/ex_cmds.c
parent1b29288709e75064b9188420d46e1028d7ee341e (diff)
downloadrneovim-93f24403f8cc760ff47979c596976b53a8b16358.tar.gz
rneovim-93f24403f8cc760ff47979c596976b53a8b16358.tar.bz2
rneovim-93f24403f8cc760ff47979c596976b53a8b16358.zip
refactor: pre-incr to post-incr
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index b4e8c6de7b..e08e977ff5 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -678,7 +678,7 @@ void ex_sort(exarg_T *eap)
// delete the original lines if appending worked
if (i == count) {
- for (i = 0; i < count; ++i) {
+ for (i = 0; i < count; i++) {
ml_delete(eap->line1, false);
}
} else {
@@ -1103,7 +1103,7 @@ void ex_copy(linenr_T line1, linenr_T line2, linenr_T n)
if (curwin->w_cursor.lnum < line2) {
line2++;
}
- ++curwin->w_cursor.lnum;
+ curwin->w_cursor.lnum++;
}
appended_lines_mark(n, count);
@@ -2601,7 +2601,7 @@ int do_ecmd(int fnum, char *ffname, char *sfname, exarg_T *eap, linenr_T newlnum
curwin->w_buffer = buf;
curbuf = buf;
- ++curbuf->b_nwindows;
+ curbuf->b_nwindows++;
// Set 'fileformat', 'binary' and 'fenc' when forced.
if (!oldbuf && eap != NULL) {
@@ -3018,7 +3018,7 @@ void ex_append(exarg_T *eap)
// Look for the "." after automatic indent.
vcol = 0;
- for (p = theline; indent > vcol; ++p) {
+ for (p = theline; indent > vcol; p++) {
if (*p == ' ') {
vcol++;
} else if (*p == TAB) {
@@ -3098,7 +3098,7 @@ void ex_change(exarg_T *eap)
append_indent = get_indent_lnum(eap->line1);
}
- for (lnum = eap->line2; lnum >= eap->line1; --lnum) {
+ for (lnum = eap->line2; lnum >= eap->line1; lnum--) {
if (curbuf->b_ml.ml_flags & ML_EMPTY) { // nothing to delete
break;
}