zapping: disjoin a zap command from earlier ones when the mark is set
This fixes the third part of https://savannah.gnu.org/bugs/?56261. Bug existed since zapping was introduced, in version 3.2.master
parent
6c4d0d87f0
commit
b50d5758ef
|
@ -450,7 +450,7 @@ void zap_text(void)
|
||||||
|
|
||||||
/* Add a new undo item only when the current item is not a ZAP or when
|
/* Add a new undo item only when the current item is not a ZAP or when
|
||||||
* the current zap is not contiguous with the previous zapping. */
|
* the current zap is not contiguous with the previous zapping. */
|
||||||
if (openfile->last_action != ZAP ||
|
if (openfile->last_action != ZAP || openfile->mark != NULL ||
|
||||||
openfile->current_undo->mark_begin_lineno != openfile->current->lineno ||
|
openfile->current_undo->mark_begin_lineno != openfile->current->lineno ||
|
||||||
openfile->current_undo->xflags & (MARK_WAS_SET|WAS_MARKED_FORWARD))
|
openfile->current_undo->xflags & (MARK_WAS_SET|WAS_MARKED_FORWARD))
|
||||||
add_undo(ZAP);
|
add_undo(ZAP);
|
||||||
|
|
Loading…
Reference in New Issue