aboutsummaryrefslogtreecommitdiffstats
path: root/ido-mode/ido_switcher.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-01-15 06:36:09 +0000
committerTom Feist <shabble@metavore.org>2011-01-15 06:36:09 +0000
commitfe7d7fe275acfec543c45bcbe3dd308a0b4e9e8f (patch)
tree2569616aff739faa7292b8528b55f5780a3605aa /ido-mode/ido_switcher.pl
parentbindings: added an example of parsing bindings a'la adv_windowlist. needs some (diff)
downloadirssi-scripts-fe7d7fe275acfec543c45bcbe3dd308a0b4e9e8f.tar.gz
irssi-scripts-fe7d7fe275acfec543c45bcbe3dd308a0b4e9e8f.zip
ido-mode/ido_switcher: added C-k to close windows without exiting mode
Diffstat (limited to '')
-rw-r--r--ido-mode/ido_switcher.pl17
1 files changed, 16 insertions, 1 deletions
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";