diff --git a/ChangeLog b/ChangeLog index 0b055bc91684630c43b59a3ebe690f5aad5fd5e6..2ebe5a45d39b1c05ff6b20aa972f5d5c1c9a767d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * files.c (write_file): Do not go on and attempt to write the main file if writing the backup file failed, related to Savannah bug 24000. * text.c (do_redo): Fix improperly restoring the text when redoing a line split. + * text.c (add_undo): Fix check for multi-line cut check skips adding other new legit events. 2008-07-23 Chris Allegretta <chrisa@asty.org> * text.c: Reset openfile-> to OTHER after an undo or redo so we don't mistakenly diff --git a/src/text.c b/src/text.c index 041e58f92a890fe45d2233f5917f1066ae81e3e0..f4892c35d691220830780afba09685b4b7c6a2e6 100644 --- a/src/text.c +++ b/src/text.c @@ -806,7 +806,8 @@ void add_undo(undo_type current_action) /* Ugh, if we were called while cutting not-to-end, non-marked and on the same lineno, we need to abort here */ u = fs->current_undo; - if (u && u->type == CUT && !u->mark_set && u->lineno == fs->current->lineno) + if (current_action == CUT && u && u->type == CUT + && !u->mark_set && u->lineno == fs->current->lineno) return; /* Blow away the old undo stack if we are starting from the middle */