diff src/undo.c @ 697:f08390485cd3 v7.0210

updated for version 7.0210
author vimboss
date Wed, 01 Mar 2006 00:01:28 +0000
parents a28f83d37113
children ac005a544e24
line wrap: on
line diff
--- a/src/undo.c
+++ b/src/undo.c
@@ -845,6 +845,28 @@ u_sync()
 }
 
 /*
+ * ":undojoin": continue adding to the last entry list
+ */
+/*ARGSUSED*/
+    void
+ex_undojoin(eap)
+    exarg_T *eap;
+{
+    if (!curbuf->b_u_synced)
+	return;		    /* already unsynced */
+    if (curbuf->b_u_newhead == NULL)
+	return;		    /* nothing changed before */
+    if (p_ul < 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 */
+    }
+}
+
+/*
  * Called after writing the file and setting b_changed to FALSE.
  * Now an undo means that the buffer is modified.
  */