mirror of https://github.com/MidnightCommander/mc
fix: incorrect move/delete block if 'Cursor beyond end of line' swiched on
fix: Enter behavior if 'Cursor beyond end of line' swiched on Signed-off-by: Ilia Maslakov <il.smind@google.com>
This commit is contained in:
parent
cdd28feca8
commit
68a6495c96
|
@ -2656,6 +2656,7 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
|
|||
edit_delete_to_line_begin (edit);
|
||||
break;
|
||||
case CK_Enter:
|
||||
edit->over_col = 0;
|
||||
if (option_auto_para_formatting) {
|
||||
edit_double_newline (edit);
|
||||
if (option_return_does_auto_indent)
|
||||
|
@ -2882,12 +2883,16 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
|
|||
break;
|
||||
|
||||
case CK_Copy:
|
||||
if ( option_cursor_beyond_eol && edit->over_col > 0 )
|
||||
edit_insert_over (edit);
|
||||
edit_block_copy_cmd (edit);
|
||||
break;
|
||||
case CK_Remove:
|
||||
edit_block_delete_cmd (edit);
|
||||
break;
|
||||
case CK_Move:
|
||||
if ( option_cursor_beyond_eol && edit->over_col > 0 )
|
||||
edit_insert_over (edit);
|
||||
edit_block_move_cmd (edit);
|
||||
break;
|
||||
|
||||
|
|
|
@ -1209,8 +1209,8 @@ edit_delete_column_of_text (WEdit * edit)
|
|||
c = edit_move_forward3 (edit, edit_bol (edit, m1), 0, m1);
|
||||
d = edit_move_forward3 (edit, edit_bol (edit, m2), 0, m2);
|
||||
|
||||
b = min (c, d);
|
||||
c = max (c, d);
|
||||
b = max(min (c, d), min (edit->column1, edit->column2));
|
||||
c = max (c, d + edit->over_col);
|
||||
|
||||
while (n--) {
|
||||
r = edit_bol (edit, edit->curs1);
|
||||
|
|
Loading…
Reference in New Issue