aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-09-28 00:36:14 +0000
committerSimon Ruderich <simon@ruderich.org>2010-09-28 00:36:14 +0000
commit4ad7cde52a924d87af026c2dc2af8033e62edc4d (patch)
treeaf70ffbf88506ff85da323079ea83aa0bc18c92b /vim-mode/vim_mode.pl
parentvim_mode: Implement :b# and :b window-name. (diff)
downloadirssi-scripts-4ad7cde52a924d87af026c2dc2af8033e62edc4d.tar.gz
irssi-scripts-4ad7cde52a924d87af026c2dc2af8033e62edc4d.zip
vim_mode: Add debug output for :b window.
Diffstat (limited to 'vim-mode/vim_mode.pl')
-rw-r--r--vim-mode/vim_mode.pl6
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;
}
}
}