copying: when using M-6, copy the final line in the buffer just once
When using --nonewlines and the cursor has arrived at the end of the final line, each press of M-6 would add another copy of that line to the cutbuffer. That is clearly not the right behavior. Also, give feedback when a press of M-6 does not actually copy anything. This fixes https://savannah.gnu.org/bugs/?58088. The bug was old -- it existed since before version 2.2.0.master
parent
387be713c8
commit
96046f1e82
|
@ -576,6 +576,12 @@ void copy_text(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (openfile->current->next == NULL && at_eol && (ISSET(CUT_FROM_CURSOR) ||
|
||||
openfile->current_x == 0 || cutbuffer)) {
|
||||
statusbar(_("Copied nothing"));
|
||||
return;
|
||||
}
|
||||
|
||||
addition = make_new_node(NULL);
|
||||
|
||||
/* Create OR add to the cutbuffer, depending on the mode, the position
|
||||
|
|
Loading…
Reference in New Issue