diff --git a/edit/editcmd.c b/edit/editcmd.c index e71718ede..78ef74598 100644 --- a/edit/editcmd.c +++ b/edit/editcmd.c @@ -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;