From ed433f6af01e188ede8883f9ce67334dd7bc11ca Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 2 Jun 2018 18:17:31 +0200 Subject: [PATCH] tweaks: drop a condition that has been made redundant two commits ago --- src/nano.h | 1 - src/text.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nano.h b/src/nano.h index 4fd186a1..e05ae523 100644 --- a/src/nano.h +++ b/src/nano.h @@ -622,7 +622,6 @@ enum #define WAS_FINAL_BACKSPACE (1<<1) #define WAS_WHOLE_LINE (1<<2) #define WAS_FINAL_LINE (1<<3) -/* The flags for the mark need to be the highest. */ #define MARK_WAS_SET (1<<4) #define WAS_MARKED_FORWARD (1<<5) #endif /* !NANO_TINY */ diff --git a/src/text.c b/src/text.c index f9596eca..5b6bc0a3 100644 --- a/src/text.c +++ b/src/text.c @@ -1298,8 +1298,7 @@ void add_undo(undo_type action) if (u != NULL && action == openfile->last_action && action == u->type && openfile->current->lineno == u->mark_begin_lineno && ((action == ADD && u->mark_begin_x == openfile->current_x) || - (action == CUT && u->xflags < MARK_WAS_SET && - keeping_cutbuffer()))) + (action == CUT && keeping_cutbuffer()))) return; /* Blow away newer undo items if we add somewhere in the middle. */