Mercurial > vim
diff src/undo.c @ 766:f0d0d3d3a1e2
updated for version 7.0225
author | vimboss |
---|---|
date | Wed, 15 Mar 2006 22:59:18 +0000 |
parents | d591d4ceeaee |
children | aaaca5077255 |
line wrap: on
line diff
--- 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)