summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-09-06 19:16:02 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-09-06 19:16:02 +0000
commit86a8cc7d6d7a40cb07b9aa9a61be4281c176d097 (patch)
treed8b226245707e41fd4d777fdd13c8f583d88dc48 /src
parent1b5099752ad2a46003797e8cc48522552d5681ef (diff)
downloadirssi-86a8cc7d6d7a40cb07b9aa9a61be4281c176d097.zip
/bind <key> command <cmd> - <cmd> doesn't need to start with / anymore
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@645 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/keyboard.c11
1 files changed, 10 insertions, 1 deletions
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)