aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2023-08-03 11:04:59 +0000
committerterminaldweller <devi@terminaldweller.com>2023-08-03 11:04:59 +0000
commitee54e5bbc45e560e6208bfb91fc65fbb5e5bfeeb (patch)
tree5bc0da40a9c0661fbf491c38b73150fc27bd2230
parentadded a dead channel mode. accepts a list. will not send anything by disablin... (diff)
downloadirssi-scripts-ee54e5bbc45e560e6208bfb91fc65fbb5e5bfeeb.tar.gz
irssi-scripts-ee54e5bbc45e560e6208bfb91fc65fbb5e5bfeeb.zip
a fix for the dead channels
-rw-r--r--vim-mode/vim_mode.pl19
1 files changed, 15 insertions, 4 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index bdfe33d..1256f09 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -2990,13 +2990,24 @@ sub handle_command_cmd {
if ($key == 13) {
my $window = Irssi::active_win();
my $server = Irssi::active_server();
- my $current_window_item_string = $server->{tag}."/".$window->{active}->{name};
- if (exists $dead_channels{$current_window_item_string}) {
- # we dont do anything
- }else{
+ if (defined $window->{active}->{name} && defined $server->{tag}) {
+ my $current_window_item_string = $server->{tag}."/".$window->{active}->{name};
+ if (exists $dead_channels{$current_window_item_string}) {
+ # we dont do anything
+ }else{
+ _commit_line();
+ return 0; # don't call _stop()
+ }
+ } else {
_commit_line();
return 0; # don't call _stop()
}
+ # if (exists $dead_channels{$current_window_item_string}) {
+ # # we dont do anything
+ # }else{
+ # _commit_line();
+ # return 0; # don't call _stop()
+ # }
}
my $map;