aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.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/undo.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/undo.c')
-rw-r--r--src/nvim/undo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 9f3d5bd1e8..e2e0bb38a2 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -2305,7 +2305,7 @@ static void u_undoredo(int undo, bool do_buf_event)
// delete backwards, it goes faster in most cases
long i;
linenr_T lnum;
- for (lnum = bot - 1, i = oldsize; --i >= 0; --lnum) {
+ for (lnum = bot - 1, i = oldsize; --i >= 0; lnum--) {
// what can we do when we run out of memory?
newarray[i] = u_save_line(lnum);
// remember we deleted the last line in the buffer, and a