From 607b4406271383bcfceb338fa4f15765d9fa0632 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 13 Apr 2002 12:28:01 +0000 Subject: 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 --- src/fe-common/core/keyboard.c | 14 ++++++++++---- 1 file 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 */ -- cgit v1.2.3