mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Don't output ctrl characters
This commit is contained in:
parent
7c7e95ea4e
commit
f7ad1c0335
@ -66,6 +66,7 @@ static int pad_start = 0;
|
|||||||
|
|
||||||
static int _handle_edit(const int ch, char *input, int *size);
|
static int _handle_edit(const int ch, char *input, int *size);
|
||||||
static int _printable(const int ch);
|
static int _printable(const int ch);
|
||||||
|
static gboolean _special_key(const int ch);
|
||||||
|
|
||||||
void
|
void
|
||||||
create_input_window(void)
|
create_input_window(void)
|
||||||
@ -373,6 +374,13 @@ _printable(const int ch)
|
|||||||
ch != KEY_F(4) && ch != KEY_F(5) && ch != KEY_F(6) &&
|
ch != KEY_F(4) && ch != KEY_F(5) && ch != KEY_F(6) &&
|
||||||
ch != KEY_F(7) && ch != KEY_F(8) && ch != KEY_F(9) &&
|
ch != KEY_F(7) && ch != KEY_F(8) && ch != KEY_F(9) &&
|
||||||
ch != KEY_F(10) && ch!= KEY_F(11) && ch != KEY_F(12) &&
|
ch != KEY_F(10) && ch!= KEY_F(11) && ch != KEY_F(12) &&
|
||||||
ch != KEY_IC && ch != KEY_EIC && ch != KEY_RESIZE);
|
ch != KEY_IC && ch != KEY_EIC && ch != KEY_RESIZE &&
|
||||||
|
!_special_key(ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
_special_key(const int ch)
|
||||||
|
{
|
||||||
|
char *str = unctrl(ch);
|
||||||
|
return ((strlen(str) > 1) && g_str_has_prefix(str, "^"));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user