mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Ticket #2081 (editor: incorrect overwrite text after input utf-8 chars)
fixed input multibyte chars in overwrite editor mode (remove character only when the first byte is inserted). thanx to Egmont Koblinger <egmont@gmail.com> for original patch and ticket. Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
parent
e1afcf372c
commit
51401d441f
@ -2946,7 +2946,8 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
|
||||
{
|
||||
if (edit->overwrite)
|
||||
{
|
||||
if (edit_get_byte (edit, edit->curs1) != '\n')
|
||||
/* remove char only one time, after input first byte, multibyte chars */
|
||||
if ((!utf8_display || edit->charpoint == 0) && edit_get_byte (edit, edit->curs1) != '\n')
|
||||
edit_delete (edit, 0);
|
||||
}
|
||||
if (option_cursor_beyond_eol && edit->over_col > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user