1
1

pasting: retain the mark's position when it was set at the cursor

When the mark is set at the current cursor position, and then something
is pasted (either with ^U or from outside of nano), then this entire
pasted text should be marked -- just like when it had been typed.  So,
the mark's position should not be adjusted not only when it is located
before the cursor but also when it is at the same place as the cursor.

This fixes https://savannah.gnu.org/bugs/?57631.

Bug existed since version 2.0.7.
Этот коммит содержится в:
Benno Schulenberg 2020-01-19 19:55:22 +01:00
родитель 12cf1c9980
Коммит e01651cde1

Просмотреть файл

@ -307,7 +307,7 @@ void ingraft_buffer(linestruct *topline)
bool same_line = (openfile->mark == openfile->current);
bool right_side_up = (openfile->mark &&
(openfile->mark->lineno < openfile->current->lineno ||
(same_line && openfile->mark_x < openfile->current_x)));
(same_line && openfile->mark_x <= openfile->current_x)));
#endif
/* Partition the buffer so that it contains no text, then delete it.*/