comparison src/undo.c @ 179:7fd70926e2e1 v7.0055

updated for version 7.0055
author vimboss
date Fri, 04 Mar 2005 23:39:37 +0000
parents 4d9eabb1396e
children 7033303ea0c0
comparison
equal deleted inserted replaced
178:4d53c2a2af94 179:7fd70926e2e1
490 } 490 }
491 #endif 491 #endif
492 492
493 u_newcount = 0; 493 u_newcount = 0;
494 u_oldcount = 0; 494 u_oldcount = 0;
495 if (curbuf->b_ml.ml_flags & ML_EMPTY)
496 u_oldcount = -1;
495 while (count--) 497 while (count--)
496 { 498 {
497 if (undo_undoes) 499 if (undo_undoes)
498 { 500 {
499 if (curbuf->b_u_curhead == NULL) /* first undo */ 501 if (curbuf->b_u_curhead == NULL) /* first undo */
523 u_undoredo(); 525 u_undoredo();
524 /* advance for next redo */ 526 /* advance for next redo */
525 curbuf->b_u_curhead = curbuf->b_u_curhead->uh_prev; 527 curbuf->b_u_curhead = curbuf->b_u_curhead->uh_prev;
526 } 528 }
527 } 529 }
530 if (curbuf->b_ml.ml_flags & ML_EMPTY)
531 --u_newcount;
528 u_undo_end(); 532 u_undo_end();
529 } 533 }
530 534
531 /* 535 /*
532 * u_undoredo: common code for undo and redo 536 * u_undoredo: common code for undo and redo