Ticket #2660 (mcedit: reset selection after paste)

mcedit reset selection after the text pasted (only in non-persistent selection mode)

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Ilia Maslakov 2012-09-25 11:48:52 +04:00
parent ee12f0c5bf
commit e6111f1d99

View File

@ -4069,6 +4069,13 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
if (option_cursor_beyond_eol && edit->over_col > 0) if (option_cursor_beyond_eol && edit->over_col > 0)
edit_insert_over (edit); edit_insert_over (edit);
edit_paste_from_X_buf_cmd (edit); edit_paste_from_X_buf_cmd (edit);
if (!option_persistent_selections && edit->mark2 >= 0)
{
if (edit->column_highlight)
edit_push_undo_action (edit, COLUMN_ON);
edit->column_highlight = 0;
edit_mark_cmd (edit, TRUE);
}
break; break;
case CK_History: case CK_History:
edit_paste_from_history (edit); edit_paste_from_history (edit);