From 2da9d7944e136d468acfb9eaceea0094fc98e1e4 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 30 Jun 2019 18:37:08 +0200 Subject: [PATCH] copying: tighten the condition under which an M-6 should copy nothing This fixes ... --- src/cut.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cut.c b/src/cut.c index 647ff50f..66f11d2b 100644 --- a/src/cut.c +++ b/src/cut.c @@ -407,8 +407,13 @@ void copy_text(void) size_t is_current_x = openfile->current_x; /* If there is nothing to copy, don't even try. */ - if (openfile->current->next == NULL && openfile->current->data[0] == '\0') + if ((openfile->current->next == NULL && openfile->current->data[0] == '\0' && + !mark_is_set) || (openfile->mark == openfile->current && + openfile->mark_x == openfile->current_x)) { + statusbar(_("Nothing was copied")); + openfile->mark = NULL; return; + } do_cut_text(TRUE, mark_is_set, FALSE, FALSE); -- 2.22.0