summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-04-13 12:28:01 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-04-13 12:28:01 +0000
commit607b4406271383bcfceb338fa4f15765d9fa0632 (patch)
tree6bd3e7788db743d0eba64a0ce6b622958c06fbfa
parent0d89364768af45ae25fc9d885bbdca7f67c165a9 (diff)
downloadirssi-607b4406271383bcfceb338fa4f15765d9fa0632.zip
If some keycombo can't be expanded, add it to state list as-is so it can use
existing combos given by GUI. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2671 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/fe-common/core/keyboard.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c
index c5870aee..8b764fce 100644
--- a/src/fe-common/core/keyboard.c
+++ b/src/fe-common/core/keyboard.c
@@ -193,7 +193,7 @@ static int expand_combo(const char *start, const char *end, GSList **out)
KEY_REC *rec;
KEYINFO_REC *info;
GSList *tmp, *tmp2, *list, *copy, *newout;
- char *str;
+ char *str, *p;
if (start == end) {
/* single key */
@@ -214,10 +214,16 @@ static int expand_combo(const char *start, const char *end, GSList **out)
if (strcmp(rec->data, str) == 0)
list = g_slist_append(list, rec);
}
- g_free(str);
- if (list == NULL)
- return FALSE;
+ if (list == NULL) {
+ /* unknown keycombo - add it as-is, maybe the GUI will
+ feed it to us as such */
+ for (p = str; *p != '\0'; p++)
+ expand_out_char(*out, *p);
+ g_free(str);
+ return TRUE;
+ }
+ g_free(str);
if (list->next == NULL) {
/* only one way to generate the combo, good */