From fe7d7fe275acfec543c45bcbe3dd308a0b4e9e8f Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Sat, 15 Jan 2011 06:36:09 +0000 Subject: ido-mode/ido_switcher: added C-k to close windows without exiting mode --- ido-mode/ido_switcher.pl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'ido-mode/ido_switcher.pl') diff --git a/ido-mode/ido_switcher.pl b/ido-mode/ido_switcher.pl index 0ad9518..66628f1 100644 --- a/ido-mode/ido_switcher.pl +++ b/ido-mode/ido_switcher.pl @@ -373,7 +373,12 @@ sub get_all_windows { push @ret, { _build_win_obj($win, $item) }; } } else { - _debug_print "Error occurred reading info from window: $win"; + if (not grep { $_->{num} == $win->{refnum} } @ret) { + my $item = { _build_win_obj($win, undef) }; + $item->{name} = "Unknown"; + push @ret, $item; + } + #_debug_print "Error occurred reading info from window: $win"; #_debug_print Dumper($win); } } @@ -727,6 +732,16 @@ sub get_all_windows { Irssi::signal_stop(); return; } + if ($key == 11) { # Ctrl-K + my $sel = get_window_match(); + _debug_print("deleting entry: " . $sel->{num}); + Irssi::command("window close " . $sel->{num}); + _update_cache(); + update_matches(); + update_window_select_prompt(); + Irssi::signal_stop(); + + } if ($key == 18) { # Ctrl-R _debug_print "skipping to prev match"; -- cgit v1.2.3