Mercurial > vim
comparison src/undo.c @ 825:6675076019ae v7.0d
updated for version 7.0d
author | vimboss |
---|---|
date | Mon, 10 Apr 2006 14:55:34 +0000 |
parents | 9f345c48220b |
children | 8bebcabccc2c |
comparison
equal
deleted
inserted
replaced
824:8dd456c1e283 | 825:6675076019ae |
---|---|
549 * original vi. If this happens twice in one macro the result will not | 549 * original vi. If this happens twice in one macro the result will not |
550 * be compatible. | 550 * be compatible. |
551 */ | 551 */ |
552 if (curbuf->b_u_synced == FALSE) | 552 if (curbuf->b_u_synced == FALSE) |
553 { | 553 { |
554 u_sync(); | 554 u_sync(TRUE); |
555 count = 1; | 555 count = 1; |
556 } | 556 } |
557 | 557 |
558 if (vim_strchr(p_cpo, CPO_UNDO) == NULL) | 558 if (vim_strchr(p_cpo, CPO_UNDO) == NULL) |
559 undo_undoes = TRUE; | 559 undo_undoes = TRUE; |
671 int above = FALSE; | 671 int above = FALSE; |
672 int did_undo = TRUE; | 672 int did_undo = TRUE; |
673 | 673 |
674 /* First make sure the current undoable change is synced. */ | 674 /* First make sure the current undoable change is synced. */ |
675 if (curbuf->b_u_synced == FALSE) | 675 if (curbuf->b_u_synced == FALSE) |
676 u_sync(); | 676 u_sync(TRUE); |
677 | 677 |
678 u_newcount = 0; | 678 u_newcount = 0; |
679 u_oldcount = 0; | 679 u_oldcount = 0; |
680 if (curbuf->b_ml.ml_flags & ML_EMPTY) | 680 if (curbuf->b_ml.ml_flags & ML_EMPTY) |
681 u_oldcount = -1; | 681 u_oldcount = -1; |
1253 | 1253 |
1254 /* | 1254 /* |
1255 * u_sync: stop adding to the current entry list | 1255 * u_sync: stop adding to the current entry list |
1256 */ | 1256 */ |
1257 void | 1257 void |
1258 u_sync() | 1258 u_sync(force) |
1259 { | 1259 int force; /* Also sync when no_u_sync is set. */ |
1260 if (curbuf->b_u_synced) | 1260 { |
1261 return; /* already synced */ | 1261 /* Skip it when already synced or syncing is disabled. */ |
1262 if (curbuf->b_u_synced || (!force && no_u_sync > 0)) | |
1263 return; | |
1262 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) | 1264 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) |
1263 if (im_is_preediting()) | 1265 if (im_is_preediting()) |
1264 return; /* XIM is busy, don't break an undo sequence */ | 1266 return; /* XIM is busy, don't break an undo sequence */ |
1265 #endif | 1267 #endif |
1266 if (p_ul < 0) | 1268 if (p_ul < 0) |