From 86a8cc7d6d7a40cb07b9aa9a61be4281c176d097 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 6 Sep 2000 19:16:02 +0000 Subject: [PATCH] /bind command - doesn't need to start with / anymore git-svn-id: http://svn.irssi.org/repos/irssi/trunk@645 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/keyboard.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c index de169d00..5663b204 100644 --- a/src/fe-common/core/keyboard.c +++ b/src/fe-common/core/keyboard.c @@ -235,7 +235,16 @@ int key_pressed(const char *key, void *data) static void sig_command(const char *data) { - signal_emit("send command", 3, data, active_win->active_server, active_win->active); + const char *cmdchars; + char *str; + + cmdchars = settings_get_str("cmdchars"); + str = strchr(cmdchars, *data) != NULL ? g_strdup(data) : + g_strdup_printf("%c%s", *cmdchars, data); + + signal_emit("send command", 3, str, active_win->active_server, active_win->active); + + g_free(str); } void read_keyinfo(KEYINFO_REC *info, CONFIG_NODE *node)