nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit ed433f6af01e188ede8883f9ce67334dd7bc11ca
parent 44814055b5a2012b67405f035834a08648a00217
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  2 Jun 2018 18:17:31 +0200

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

Diffstat:
Msrc/nano.h | 1-
Msrc/text.c | 3+--
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git 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 @@ -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. */