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/ex_cmds.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/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 10 |
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; } |