mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-24 20:22:11 +03:00
Ticket #1553
fixed wrong rectangular selection when selected from right to left and/or bottom to top Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
parent
2111bfc05d
commit
dc8c80c334
@ -1023,8 +1023,15 @@ int eval_marks (WEdit * edit, long *start_mark, long *end_mark)
|
||||
*start_mark = min (edit->mark1, edit->mark2);
|
||||
*end_mark = max (edit->mark1, edit->mark2);
|
||||
} else {
|
||||
int diff;
|
||||
*start_mark = min (edit->mark1, edit->curs1);
|
||||
*end_mark = max (edit->mark1, edit->curs1);
|
||||
diff = (*start_mark - edit_bol (edit, *start_mark)) -
|
||||
(*end_mark - edit_bol (edit, *end_mark));
|
||||
if (diff > 0) {
|
||||
*start_mark -= diff;
|
||||
*end_mark += diff;
|
||||
}
|
||||
edit->column2 = edit->curs_col + edit->over_col;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user