copying: make M-6 do nothing when at end of buffer

master
Benno Schulenberg 2019-04-30 19:03:18 +02:00
parent e5831f81bb
commit 0c561f0325
1 changed files with 4 additions and 0 deletions

View File

@ -408,6 +408,10 @@ void do_copy_text(void)
ssize_t is_current_lineno = openfile->current->lineno;
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')
return;
if (mark_is_set || openfile->current != next_contiguous_line)
keep_cutbuffer = FALSE;