Merge branch '1837_block_selection_fix'

* 1837_block_selection_fix:
  Ticket #1837 (incorrect block selection)
This commit is contained in:
Ilia Maslakov 2009-11-20 15:36:18 +03:00
commit a1552e9f06
1 changed files with 7 additions and 5 deletions

View File

@ -1046,11 +1046,13 @@ 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);
diff = (*start_mark - edit_bol (edit, *start_mark)) - if (column_highlighting) {
(*end_mark - edit_bol (edit, *end_mark)); diff = (*start_mark - edit_bol (edit, *start_mark)) -
if (diff > 0) { (*end_mark - edit_bol (edit, *end_mark));
*start_mark -= diff; if (diff > 0) {
*end_mark += diff; *start_mark -= diff;
*end_mark += diff;
}
} }
edit->column2 = edit->curs_col + edit->over_col; edit->column2 = edit->curs_col + edit->over_col;
} }