mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
fix: incorrect show and input capitalize chars in UTF-8 locale and 8-bit source
This commit is contained in:
parent
cc54a2083b
commit
202ec6d78f
@ -485,7 +485,8 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
|
||||
break;
|
||||
}
|
||||
if (!edit->utf8) {
|
||||
if (is_printable (c)) {
|
||||
if ( ( utf8_display && g_unichar_isprint (c) ) ||
|
||||
( utf8_display == 0 && is_printable (c) ) ) {
|
||||
p->ch = c;
|
||||
p++;
|
||||
} else {
|
||||
|
@ -298,7 +298,6 @@ edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch)
|
||||
|
||||
/* 8-bit source */
|
||||
} else {
|
||||
edit->charbuf[edit->charpoint + 1] = '\0';
|
||||
int res = str_is_valid_char (edit->charbuf, edit->charpoint);
|
||||
if (res < 0) {
|
||||
if (res != -2) {
|
||||
@ -312,11 +311,9 @@ edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch)
|
||||
c = convert_from_utf_to_current ( edit->charbuf );
|
||||
edit->charbuf[0] = '\0';
|
||||
edit->charpoint = 0;
|
||||
if (is_printable (c)) {
|
||||
char_for_insertion = c;
|
||||
goto fin;
|
||||
}
|
||||
}
|
||||
/* unprinteble utf input, skip it */
|
||||
edit->charbuf[0] = '\0';
|
||||
edit->charpoint = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user