diff options
| author | Simon Ruderich <simon@ruderich.org> | 2010-09-28 00:36:14 +0000 |
|---|---|---|
| committer | Simon Ruderich <simon@ruderich.org> | 2010-09-28 00:36:14 +0000 |
| commit | 4ad7cde52a924d87af026c2dc2af8033e62edc4d (patch) | |
| tree | af70ffbf88506ff85da323079ea83aa0bc18c92b | |
| parent | vim_mode: Implement :b# and :b window-name. (diff) | |
| download | irssi-scripts-4ad7cde52a924d87af026c2dc2af8033e62edc4d.tar.gz irssi-scripts-4ad7cde52a924d87af026c2dc2af8033e62edc4d.zip | |
vim_mode: Add debug output for :b window.
| -rw-r--r-- | vim-mode/vim_mode.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 46ae7cc..eadcce2 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -707,15 +707,19 @@ sub cmd_ex_command { push @matches, { window => $window, item => undef, ratio => $ratio }; + print ":b $window->{name}: $ratio" if DEBUG; } # Matching Window item names (= channels). foreach my $item ($window->items()) { if ($item->{name} =~ /$regex/) { my $length = length($item->{name}); $length-- if index($item->{name}, '#') == 0; + my $ratio = ($+[0] - $-[0]) / $length; push @matches, { window => $window, item => $item, - ratio => ($+[0] - $-[0]) / $length }; + ratio => $ratio }; + print ":b $window->{name} $item->{name}: $ratio" + if DEBUG; } } } |
