summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-15 22:59:18 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-15 22:59:18 +0000
commit7d47b6eed707db9af160ec517b71e1f9fdac1a0f (patch)
treef93785b6fba72029e272fac10caed4cda5c09f4e /src/undo.c
parent5671873089d516a10c79733182797075071eb5f3 (diff)
downloadvim-git-7d47b6eed707db9af160ec517b71e1f9fdac1a0f.tar.gz
updated for version 7.0225
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/undo.c b/src/undo.c
index 88f11a342..27f04b92e 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -295,6 +295,8 @@ u_savecommon(top, bot, newbot)
if (uhp == NULL)
goto nomem;
}
+ else
+ uhp = NULL;
/*
* If we undid more than we redid, move the entry lists before and
@@ -326,7 +328,7 @@ u_savecommon(top, bot, newbot)
}
}
- if (p_ul < 0) /* no undo at all */
+ if (uhp == NULL) /* no undo at all */
{
if (old_curhead != NULL)
u_freebranch(curbuf, old_curhead, NULL);
@@ -655,6 +657,10 @@ undo_time(step, sec)
int dosec = sec;
int above = FALSE;
+ /* First make sure the current undoable change is synced. */
+ if (curbuf->b_u_synced == FALSE)
+ u_sync();
+
u_newcount = 0;
u_oldcount = 0;
if (curbuf->b_ml.ml_flags & ML_EMPTY)