diff -ur mc-4.7.0.3.orig/src/editor/edit.c mc-4.7.0.3/src/editor/edit.c
old
|
new
|
|
2615 | 2615 | /* An ordinary key press */ |
2616 | 2616 | if (char_for_insertion >= 0) { |
2617 | 2617 | if (edit->overwrite) { |
2618 | | if (edit_get_byte (edit, edit->curs1) != '\n') |
| 2618 | /* If UTF-8, only remove a whole character when the first byte is inserted. */ |
| 2619 | if (edit_get_byte (edit, edit->curs1) != '\n' && |
| 2620 | (!edit->utf8 || (char_for_insertion & 0xC0) != 0x80)) |
2619 | 2621 | edit_delete (edit, 0); |
2620 | 2622 | } |
2621 | 2623 | if ( option_cursor_beyond_eol && edit->over_col > 0 ) |