mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-10 03:22:04 +03:00
justify: restore a region properly when it was marked backwards
This fixes https://savannah.gnu.org/bugs/?57960.
Bug existed since version 4.8, commit e01651cd
.
This commit is contained in:
parent
2d05ce37c6
commit
f2d89cb3bc
@ -2131,10 +2131,9 @@ void do_justify(bool full_justify)
|
||||
|
||||
/* If we justified marked text, restore mark or cursor position. */
|
||||
if (openfile->mark) {
|
||||
if (right_side_up) {
|
||||
openfile->mark = line_from_number(was_top_lineno);
|
||||
openfile->mark_x = was_top_x;
|
||||
} else {
|
||||
if (!right_side_up) {
|
||||
openfile->mark = openfile->current;
|
||||
openfile->mark_x = openfile->current_x;
|
||||
openfile->current = line_from_number(was_top_lineno);
|
||||
openfile->current_x = was_top_x;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user