From 93f24403f8cc760ff47979c596976b53a8b16358 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 24 Aug 2022 22:49:25 +0100 Subject: refactor: pre-incr to post-incr --- src/nvim/undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/undo.c') 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 -- cgit