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:
Ilia Maslakov 2010-04-06 15:08:30 +04:00
parent e1afcf372c
commit 51401d441f

View File

@ -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)