diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-06-11 12:30:12 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-06-11 12:30:12 +0200 |
commit | a326c2578cdf4647ef97ae60a24c765ca0dac331 (patch) | |
tree | 70a9254da162a920bbb428b4b29edebf467889e7 /src | |
parent | 19b7039005a109b332fb44a33c26fe3c42416f57 (diff) | |
download | weechat-a326c2578cdf4647ef97ae60a24c765ca0dac331.zip |
Add key alt-j + alt-s to jump to IRC server buffer, bound to command /server jump
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/curses/gui-curses-keyboard.c | 1 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 14 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/gui/curses/gui-curses-keyboard.c b/src/gui/curses/gui-curses-keyboard.c index d7d1e6a4e..08495a2c8 100644 --- a/src/gui/curses/gui-curses-keyboard.c +++ b/src/gui/curses/gui-curses-keyboard.c @@ -116,6 +116,7 @@ gui_keyboard_default_bindings () gui_keyboard_default_bind (/* m-a */ "meta-a", "/input jump_smart"); gui_keyboard_default_bind (/* m-j,m-l */ "meta-jmeta-l", "/input jump_last_buffer"); gui_keyboard_default_bind (/* m-j,m-r */ "meta-jmeta-r", "/server raw"); + gui_keyboard_default_bind (/* m-j,m-s */ "meta-jmeta-s", "/server jump"); gui_keyboard_default_bind (/* m-h */ "meta-h", "/input hotlist_clear"); gui_keyboard_default_bind (/* m-k */ "meta-k", "/input grab_key"); gui_keyboard_default_bind (/* m-u */ "meta-u", "/input scroll_unread"); diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 37cf1bef9..58e7afb4b 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -3082,13 +3082,20 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, IRC_PLUGIN_NAME); return WEECHAT_RC_OK; } - + if (weechat_strcasecmp (argv[1], "raw") == 0) { irc_raw_open (1); return WEECHAT_RC_OK; } + if (weechat_strcasecmp (argv[1], "jump") == 0) + { + if (ptr_server && ptr_server->buffer) + weechat_buffer_set (ptr_server->buffer, "display", "1"); + return WEECHAT_RC_OK; + } + weechat_printf (NULL, _("%s%s: unknown option for \"%s\" command"), weechat_prefix ("error"), IRC_PLUGIN_NAME, "server"); @@ -4012,7 +4019,7 @@ irc_command_init () "[copy servername newservername] | " "[rename servername newservername] | " "[keep servername] | [del servername] | " - "[deloutq] | [raw]"), + "[deloutq] | [jump] | [raw]"), N_(" list: list servers (no parameter implies " "this list)\n" " listfull: list servers with detailed info for " @@ -4036,6 +4043,7 @@ irc_command_init () " deloutq: delete messages out queue for all " "servers (all messages WeeChat is currently " "sending)\n" + " jump: jump to server buffer\n" " raw: open buffer with raw IRC data\n\n" "Examples:\n" " /server listfull\n" @@ -4048,7 +4056,7 @@ irc_command_init () " /server del freenode\n" " /server deloutq\n" " /server switch"), - "add|copy|rename|keep|del|deloutq|list|listfull|" + "add|copy|rename|keep|del|deloutq|jump|list|listfull|" "raw|switch %(irc_servers) %(irc_servers)", &irc_command_server, NULL); weechat_hook_command ("servlist", |