1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

Improved key bindings: now possible to bind a key on many commands, separated by semicolon (task #5444)

This commit is contained in:
Sebastien Helleu
2007-05-23 16:07:31 +00:00
parent c0762e3b13
commit fb3fd5b0eb
4 changed files with 34 additions and 8 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2007-05-22
ChangeLog - 2007-05-23
Version 0.2.5 (under dev!):
* improved key bindings: now possible to bind a key on many commands,
separated by semicolon (task #5444)
* improved IRC long message split: use word boundary (task #6685)
* removed ":" for unknown IRC commands before arguments (bug #19929)
* fixed "%C" completion: now completes with all channels of all servers
+14 -3
View File
@@ -552,6 +552,7 @@ gui_keyboard_pressed (char *key_str)
int first_key;
t_gui_key *ptr_key;
char *buffer_before_key;
char **commands, **ptr_cmd;
/* add key to buffer */
first_key = (gui_key_buffer[0] == '\0');
@@ -576,9 +577,19 @@ gui_keyboard_pressed (char *key_str)
strdup (gui_current_window->buffer->input_buffer) : strdup ("");
gui_key_buffer[0] = '\0';
if (ptr_key->command)
user_command (SERVER(gui_current_window->buffer),
CHANNEL(gui_current_window->buffer),
ptr_key->command, 0);
{
commands = split_multi_command (ptr_key->command, ';');
if (commands)
{
for (ptr_cmd = commands; *ptr_cmd; ptr_cmd++)
{
user_command (SERVER(gui_current_window->buffer),
CHANNEL(gui_current_window->buffer),
*ptr_cmd, 0);
}
free_multi_command (commands);
}
}
else
(void)(ptr_key->function)(gui_current_window, ptr_key->args);
#ifdef PLUGINS
+3 -1
View File
@@ -1,10 +1,12 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2007-05-22
ChangeLog - 2007-05-23
Version 0.2.5 (under dev!):
* improved key bindings: now possible to bind a key on many commands,
separated by semicolon (task #5444)
* improved IRC long message split: use word boundary (task #6685)
* removed ":" for unknown IRC commands before arguments (bug #19929)
* fixed "%C" completion: now completes with all channels of all servers
+14 -3
View File
@@ -552,6 +552,7 @@ gui_keyboard_pressed (char *key_str)
int first_key;
t_gui_key *ptr_key;
char *buffer_before_key;
char **commands, **ptr_cmd;
/* add key to buffer */
first_key = (gui_key_buffer[0] == '\0');
@@ -576,9 +577,19 @@ gui_keyboard_pressed (char *key_str)
strdup (gui_current_window->buffer->input_buffer) : strdup ("");
gui_key_buffer[0] = '\0';
if (ptr_key->command)
user_command (SERVER(gui_current_window->buffer),
CHANNEL(gui_current_window->buffer),
ptr_key->command, 0);
{
commands = split_multi_command (ptr_key->command, ';');
if (commands)
{
for (ptr_cmd = commands; *ptr_cmd; ptr_cmd++)
{
user_command (SERVER(gui_current_window->buffer),
CHANNEL(gui_current_window->buffer),
*ptr_cmd, 0);
}
free_multi_command (commands);
}
}
else
(void)(ptr_key->function)(gui_current_window, ptr_key->args);
#ifdef PLUGINS