tweaks: invert a condition, to see the similarity between the two modes

The two modes being: the normal full-line cutting, and --cutfromcursor.
master
Benno Schulenberg 2020-03-31 19:17:17 +02:00
parent 4b814698bd
commit 7660849b8f
1 changed files with 5 additions and 5 deletions

View File

@ -598,15 +598,15 @@ void copy_text(void)
cutbottom = make_new_node(cutbuffer); cutbottom = make_new_node(cutbuffer);
cutbottom->data = copy_of(""); cutbottom->data = copy_of("");
cutbuffer->next = cutbottom; cutbuffer->next = cutbottom;
} else if (at_eol) { } else if (!at_eol) {
addition->prev = cutbottom;
cutbottom->next = addition;
cutbottom = addition;
} else {
addition->prev = cutbottom->prev; addition->prev = cutbottom->prev;
addition->prev->next = addition; addition->prev->next = addition;
delete_node(cutbottom); delete_node(cutbottom);
cutbottom = addition; cutbottom = addition;
} else {
addition->prev = cutbottom;
cutbottom->next = addition;
cutbottom = addition;
} }
} else { } else {
addition->data = copy_of(openfile->current->data); addition->data = copy_of(openfile->current->data);