mirror of https://github.com/MidnightCommander/mc
Merge branch '1837_block_selection_fix'
* 1837_block_selection_fix: Ticket #1837 (incorrect block selection)
This commit is contained in:
commit
a1552e9f06
|
@ -1046,12 +1046,14 @@ int eval_marks (WEdit * edit, long *start_mark, long *end_mark)
|
||||||
int diff;
|
int diff;
|
||||||
*start_mark = min (edit->mark1, edit->curs1);
|
*start_mark = min (edit->mark1, edit->curs1);
|
||||||
*end_mark = max (edit->mark1, edit->curs1);
|
*end_mark = max (edit->mark1, edit->curs1);
|
||||||
|
if (column_highlighting) {
|
||||||
diff = (*start_mark - edit_bol (edit, *start_mark)) -
|
diff = (*start_mark - edit_bol (edit, *start_mark)) -
|
||||||
(*end_mark - edit_bol (edit, *end_mark));
|
(*end_mark - edit_bol (edit, *end_mark));
|
||||||
if (diff > 0) {
|
if (diff > 0) {
|
||||||
*start_mark -= diff;
|
*start_mark -= diff;
|
||||||
*end_mark += diff;
|
*end_mark += diff;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
edit->column2 = edit->curs_col + edit->over_col;
|
edit->column2 = edit->curs_col + edit->over_col;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue