diff --git a/ChangeLog b/ChangeLog index 0300230c..830386f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-10-29 Benno Schulenberg + * src/text.c (add_undo): Only skip adding an undo when the current + action equals the last action. This condition is needed for when + typing text is broken by an undo+redo. Fixes Savannah bug #46323. + 2015-10-29 David Lawrence Ramsey * src/files.c (do_writeout), src/nano.c (no_current_file_name_warning, do_exit): When option -t is given, make ^O work the same way as under diff --git a/src/text.c b/src/text.c index c207b467..1fed0638 100644 --- a/src/text.c +++ b/src/text.c @@ -912,7 +912,7 @@ void add_undo(undo_type action) /* When doing contiguous adds or contiguous cuts -- which means: with * no cursor movement in between -- don't add a new undo item. */ - if (u && u->mark_begin_lineno == fs->current->lineno && + if (u && u->mark_begin_lineno == fs->current->lineno && action == fs->last_action && ((action == ADD && u->type == ADD && u->mark_begin_x == fs->current_x) || (action == CUT && u->type == CUT && !u->mark_set && keeping_cutbuffer()))) return;