mcedit: fix block movement.

steps to reproduce:
1) create text
111111111111111111
222222222222222222
333333333333333333
444444444444444444
555555555555555555

2) select text from line 2 to line 4
3) move cursor to line 3
4) press F6

The block was moved but should't.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Ilia Maslakov 2012-10-09 22:19:31 +07:00 committed by Andrew Borodin
parent b8e02442fd
commit 01bf58e688

View File

@ -2449,6 +2449,9 @@ edit_block_move_cmd (WEdit * edit)
if (eval_marks (edit, &start_mark, &end_mark)) if (eval_marks (edit, &start_mark, &end_mark))
return; return;
if (!edit->column_highlight && edit->curs1 > start_mark && edit->curs1 < end_mark)
return;
line = edit->curs_line; line = edit->curs_line;
if (edit->mark2 < 0) if (edit->mark2 < 0)
edit_mark_cmd (edit, FALSE); edit_mark_cmd (edit, FALSE);