summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-01 00:01:28 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-01 00:01:28 +0000
commite224ffa156ce968d3e823fb8aa77d93812ca4092 (patch)
tree3b2339f73910b010487b90c7f12ed960c562e46e /src/undo.c
parent03f4855fc252dd389622715dd56cbc49423057ba (diff)
downloadvim-e224ffa156ce968d3e823fb8aa77d93812ca4092.zip
updated for version 7.0210
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/undo.c b/src/undo.c
index 1ead1561f..0c7cbd751 100644
--- 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.
*/