mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
/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
This commit is contained in:
parent
1b5099752a
commit
86a8cc7d6d
@ -235,7 +235,16 @@ int key_pressed(const char *key, void *data)
|
|||||||
|
|
||||||
static void sig_command(const char *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)
|
void read_keyinfo(KEYINFO_REC *info, CONFIG_NODE *node)
|
||||||
|
Loading…
Reference in New Issue
Block a user