place cursor after inserted chars by 'block move' command
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
родитель
7a5458fd9b
Коммит
77c599be70
@ -2500,7 +2500,7 @@ edit_block_move_cmd (WEdit * edit)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
off_t count;
|
off_t count, count_orig;
|
||||||
|
|
||||||
current = edit->curs1;
|
current = edit->curs1;
|
||||||
copy_buf = g_malloc0 (end_mark - start_mark);
|
copy_buf = g_malloc0 (end_mark - start_mark);
|
||||||
@ -2515,9 +2515,15 @@ edit_block_move_cmd (WEdit * edit)
|
|||||||
current - edit->curs1 -
|
current - edit->curs1 -
|
||||||
(((current - edit->curs1) > 0) ? end_mark - start_mark : 0));
|
(((current - edit->curs1) > 0) ? end_mark - start_mark : 0));
|
||||||
edit_scroll_screen_over_cursor (edit);
|
edit_scroll_screen_over_cursor (edit);
|
||||||
|
count_orig = count;
|
||||||
while (count-- > start_mark)
|
while (count-- > start_mark)
|
||||||
edit_insert_ahead (edit, copy_buf[end_mark - count - 1]);
|
edit_insert_ahead (edit, copy_buf[end_mark - count - 1]);
|
||||||
|
|
||||||
edit_set_markers (edit, edit->curs1, edit->curs1 + end_mark - start_mark, 0, 0);
|
edit_set_markers (edit, edit->curs1, edit->curs1 + end_mark - start_mark, 0, 0);
|
||||||
|
|
||||||
|
/* Place cursor at the end of text selection */
|
||||||
|
if (option_cursor_after_inserted_block)
|
||||||
|
edit_cursor_move (edit, count_orig - start_mark);
|
||||||
}
|
}
|
||||||
|
|
||||||
edit_scroll_screen_over_cursor (edit);
|
edit_scroll_screen_over_cursor (edit);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user