tweaks: drop a condition that has been made redundant two commits ago

master
Benno Schulenberg 2018-06-02 18:17:31 +02:00
parent 44814055b5
commit ed433f6af0
2 changed files with 1 additions and 3 deletions

View File

@ -622,7 +622,6 @@ enum
#define WAS_FINAL_BACKSPACE (1<<1) #define WAS_FINAL_BACKSPACE (1<<1)
#define WAS_WHOLE_LINE (1<<2) #define WAS_WHOLE_LINE (1<<2)
#define WAS_FINAL_LINE (1<<3) #define WAS_FINAL_LINE (1<<3)
/* The flags for the mark need to be the highest. */
#define MARK_WAS_SET (1<<4) #define MARK_WAS_SET (1<<4)
#define WAS_MARKED_FORWARD (1<<5) #define WAS_MARKED_FORWARD (1<<5)
#endif /* !NANO_TINY */ #endif /* !NANO_TINY */

View File

@ -1298,8 +1298,7 @@ void add_undo(undo_type action)
if (u != NULL && action == openfile->last_action && action == u->type && if (u != NULL && action == openfile->last_action && action == u->type &&
openfile->current->lineno == u->mark_begin_lineno && openfile->current->lineno == u->mark_begin_lineno &&
((action == ADD && u->mark_begin_x == openfile->current_x) || ((action == ADD && u->mark_begin_x == openfile->current_x) ||
(action == CUT && u->xflags < MARK_WAS_SET && (action == CUT && keeping_cutbuffer())))
keeping_cutbuffer())))
return; return;
/* Blow away newer undo items if we add somewhere in the middle. */ /* Blow away newer undo items if we add somewhere in the middle. */