aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-08-25 14:30:12 +0100
committerGitHub <noreply@github.com>2022-08-25 14:30:12 +0100
commit99f8d34c8a7128a9adb43168ca5364ccbd568333 (patch)
tree0a28a1505debe6e4d1025f9c518a7b0fe1ab769c /src/nvim/ex_cmds.c
parentcd2d3aa48f3531103a3a355d76394301e7b074df (diff)
parent93f24403f8cc760ff47979c596976b53a8b16358 (diff)
downloadrneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.tar.gz
rneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.tar.bz2
rneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.zip
Merge pull request #19934 from lewis6991/prepostincr
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;
}