diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-10 14:55:34 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-10 14:55:34 +0000 |
commit | 779b74b2a23643aaac026341a4ed8bd6e04371e6 (patch) | |
tree | ff8fae99da608c087d6b56075dac7c0e73a7e1d7 /src/undo.c | |
parent | c6fe919573e82727a7de014daab122ffc5001854 (diff) | |
download | vim-git-779b74b2a23643aaac026341a4ed8bd6e04371e6.tar.gz |
updated for version 7.0dv7.0d
Diffstat (limited to 'src/undo.c')
-rw-r--r-- | src/undo.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/undo.c b/src/undo.c index efbd4ccf4..a2861d536 100644 --- a/src/undo.c +++ b/src/undo.c @@ -551,7 +551,7 @@ u_undo(count) */ if (curbuf->b_u_synced == FALSE) { - u_sync(); + u_sync(TRUE); count = 1; } @@ -673,7 +673,7 @@ undo_time(step, sec, absolute) /* First make sure the current undoable change is synced. */ if (curbuf->b_u_synced == FALSE) - u_sync(); + u_sync(TRUE); u_newcount = 0; u_oldcount = 0; @@ -1255,10 +1255,12 @@ u_undo_end(did_undo, absolute) * u_sync: stop adding to the current entry list */ void -u_sync() +u_sync(force) + int force; /* Also sync when no_u_sync is set. */ { - if (curbuf->b_u_synced) - return; /* already synced */ + /* Skip it when already synced or syncing is disabled. */ + if (curbuf->b_u_synced || (!force && no_u_sync > 0)) + return; #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) if (im_is_preediting()) return; /* XIM is busy, don't break an undo sequence */ |