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)
diff --git a/src/undo.c b/src/undo.c
index 607f35f..b69f318 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -3136,11 +3136,8 @@
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;
}
/*