mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Ticket #3260: mcview hex edit: can't enter certain UTF-8 characters.
(mcview_handle_editkey): an is_printable() check was performed for every byte of the UTF-8 which obviously doesn't make sense. This check shouldn't be performed for 8-bit charsets either. If the given byte can arrive as input, the file should be modified accordingly. The TAB key shouldn't be accepted as literal, to allow moving back to the hexview area. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
c00c298b53
commit
f0ab29b820
@ -252,7 +252,7 @@ mcview_handle_editkey (mcview_t * view, int key)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Text editing */
|
/* Text editing */
|
||||||
if (key < 256 && ((key == '\n') || is_printable (key)))
|
if (key < 256 && key != '\t')
|
||||||
byte_val = key;
|
byte_val = key;
|
||||||
else
|
else
|
||||||
return MSG_NOT_HANDLED;
|
return MSG_NOT_HANDLED;
|
||||||
|
Loading…
Reference in New Issue
Block a user