diff options
| author | Tom Feist <shabble@metavore.org> | 2010-12-31 00:00:38 +0000 | 
|---|---|---|
| committer | Tom Feist <shabble@metavore.org> | 2010-12-31 00:00:38 +0000 | 
| commit | 2da7fed0559a6f8249cef1f4ec6f67b65deee49a (patch) | |
| tree | c592cacc8877f4cfb079cd04a4f22200488c3567 /ido-mode | |
| parent | ido_switch: more doc and comment fixes (diff) | |
| download | irssi-scripts-2da7fed0559a6f8249cef1f4ec6f67b65deee49a.tar.gz irssi-scripts-2da7fed0559a6f8249cef1f4ec6f67b65deee49a.zip | |
ido_switch: bugfix: visiting active items removes them from the active list.
Diffstat (limited to 'ido-mode')
| -rw-r--r-- | ido-mode/ido_switcher.pl | 16 | 
1 files changed, 9 insertions, 7 deletions
| diff --git a/ido-mode/ido_switcher.pl b/ido-mode/ido_switcher.pl index 0ae5e1f..5d6be5a 100644 --- a/ido-mode/ido_switcher.pl +++ b/ido-mode/ido_switcher.pl @@ -356,17 +356,18 @@ sub get_all_windows {      }      sub ido_switch_select { -        my ($selected, $is_refnum) = @_; +        my ($selected) = @_;          _debug_print "Selecting window: " . $selected->{name};          Irssi::command("WINDOW GOTO " . $selected->{name}); -        if ($selected->{type} ne 'WINDOW') { +        if ($selected->{type} ne 'WIN') {              _debug_print "Selecting window item: " . $selected->{itemname};              Irssi::command("WINDOW ITEM GOTO " . $selected->{itemname});          } +        update_matches();      }      sub ido_switch_exit { @@ -398,9 +399,13 @@ sub get_all_windows {              my @ordered_matches = _order_matches(@search_matches); -            my %uniq; +            my @display = @ordered_matches[0..$show_count - 1]; +              # determine which items are non-unique, if any. -            foreach my $res (@ordered_matches) { + +            my %uniq; + +            foreach my $res (@display) {                  my $name = $res->{name};                  if (exists $uniq{$name}) { @@ -420,9 +425,6 @@ sub get_all_windows {                  }              } -            # -            my @display = @ordered_matches[0..$show_count - 1]; -              # show the first entry in green              my $first = shift @display; | 
