From ee54e5bbc45e560e6208bfb91fc65fbb5e5bfeeb Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Thu, 3 Aug 2023 14:34:59 +0330 Subject: a fix for the dead channels --- vim-mode/vim_mode.pl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'vim-mode/vim_mode.pl') 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; -- cgit v1.2.3