mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Bugfix to keyb. code :) And now the "key" names can contain only
alphanumeric + '_' characters, which makes /BIND foo meta-5~ work again because 5~ are treated separately, not as one "key" name. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1739 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
22e5f3a3fe
commit
55be71a726
@ -261,7 +261,19 @@ static int expand_key(const char *key, GSList **out)
|
||||
|
||||
/* meta-^W^Gf -> ^[-^W-^G-f */
|
||||
start = NULL; last_hyphen = TRUE;
|
||||
for (; *key != '\0'; key++) {
|
||||
for (; *key != '\0'; key++) {
|
||||
if (start != NULL) {
|
||||
if (isalnum(*key) || *key == '_') {
|
||||
/* key combo continues */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!expand_combo(start, key-1, out))
|
||||
return FALSE;
|
||||
expand_out_char(*out, '-');
|
||||
start = NULL;
|
||||
}
|
||||
|
||||
if (*key == '-') {
|
||||
if (last_hyphen) {
|
||||
expand_out_char(*out, '-');
|
||||
@ -279,18 +291,10 @@ static int expand_key(const char *key, GSList **out)
|
||||
last_hyphen = TRUE;
|
||||
} else {
|
||||
/* key / combo */
|
||||
if (start == NULL)
|
||||
start = key;
|
||||
start = key;
|
||||
last_hyphen = FALSE;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (start != NULL) {
|
||||
if (!expand_combo(start, key-1, out))
|
||||
return FALSE;
|
||||
expand_out_char(*out, '-');
|
||||
start = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (start != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user