Skip to content

Commit

Permalink
Ticket #3260: mcview hex edit: can't enter certain UTF-8 characters.
Browse files Browse the repository at this point in the history
(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 <[email protected]>
  • Loading branch information
egmontkob authored and aborodin committed Feb 17, 2015
1 parent c00c298 commit f0ab29b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/viewer/actions_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ mcview_handle_editkey (mcview_t * view, int key)
else
{
/* Text editing */
if (key < 256 && ((key == '\n') || is_printable (key)))
if (key < 256 && key != '\t')
byte_val = key;
else
return MSG_NOT_HANDLED;
Expand Down

0 comments on commit f0ab29b

Please sign in to comment.