From 5e4e1b12998b1ed99138cad1c5da4d430f798547 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 17 Jan 2017 22:09:45 +0100 Subject: patch 8.0.0205: wrong behavior after :undojoin Problem: After :undojoin some commands don't work properly, such as :redo. (Matthew Malcomson) Solution: Don't set curbuf->b_u_curhead. (closes #1390) --- src/undo.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/undo.c') diff --git a/src/undo.c b/src/undo.c index 607f35fdd..b69f31872 100644 --- a/src/undo.c +++ b/src/undo.c @@ -3136,11 +3136,8 @@ ex_undojoin(exarg_T *eap UNUSED) if (get_undolevel() < 0) return; /* no entries, nothing to do */ else - { - /* Go back to the last entry */ - curbuf->b_u_curhead = curbuf->b_u_newhead; - curbuf->b_u_synced = FALSE; /* no entries, nothing to do */ - } + /* Append next change to the last entry */ + curbuf->b_u_synced = FALSE; } /* -- cgit v1.2.1