From 7660849b8ff498239d6f4ea575f860d4344542a6 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 31 Mar 2020 19:17:17 +0200 Subject: [PATCH] tweaks: invert a condition, to see the similarity between the two modes The two modes being: the normal full-line cutting, and --cutfromcursor. --- src/cut.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cut.c b/src/cut.c index 5236d7af..50376a0b 100644 --- a/src/cut.c +++ b/src/cut.c @@ -598,15 +598,15 @@ void copy_text(void) cutbottom = make_new_node(cutbuffer); cutbottom->data = copy_of(""); cutbuffer->next = cutbottom; - } else if (at_eol) { - addition->prev = cutbottom; - cutbottom->next = addition; - cutbottom = addition; - } else { + } else if (!at_eol) { addition->prev = cutbottom->prev; addition->prev->next = addition; delete_node(cutbottom); cutbottom = addition; + } else { + addition->prev = cutbottom; + cutbottom->next = addition; + cutbottom = addition; } } else { addition->data = copy_of(openfile->current->data);