diff options
author | Tom Feist <shabble@metavore.org> | 2010-11-22 19:25:33 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2010-11-22 19:25:33 +0000 |
commit | 62b5a3f37f96de31075e9d603c589b799e12689d (patch) | |
tree | 6294d09bfba803266401fc0ead0a5c8779347cbd | |
parent | scrolled_reminder: remove 'SPC goes to end of buffer' message once it has bee... (diff) | |
download | irssi-scripts-62b5a3f37f96de31075e9d603c589b799e12689d.tar.gz irssi-scripts-62b5a3f37f96de31075e9d603c589b799e12689d.zip |
vim_mode: fix :snext/prev generating warnings when not connected
-rw-r--r-- | vim-mode/vim_mode.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 3ed29ae..94d8967 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -1796,6 +1796,9 @@ sub ex_server_next { my @server_ids = map { $_->{tag} . "\x1d" . $_->{nick} } Irssi::servers; my $server = Irssi::active_server; + + return unless $server; + my $current_id = $server->{tag} . "\x1d" . $server->{nick}; my $next = 0; my $server_count = scalar @server_ids; @@ -1820,6 +1823,9 @@ sub ex_server_prev { my @server_ids = map { $_->{tag} . "\x1d" . $_->{nick} } Irssi::servers; my $server = Irssi::active_server; + + return unless $server; + my $current_id = $server->{tag} . "\x1d" . $server->{nick}; my $prev = 0; my $server_count = scalar @server_ids; |